/* Shared styles for registration pages */

:root {
    --register-bg: #f4f5f7;
    --register-white: #ffffff;
    --register-primary: #3b5998;
    --register-primary-dark: #34435b;
    --register-primary-light: #436292;
    --register-input-bg: #f7fafc;
    --register-input-border: #e2e8f0;
    --register-input-focus: #cbd5e1;
    --register-cancel: #cc453b;
    --register-cancel-hover: #b5382f;
    --register-submit: #57b685;
    --register-submit-hover: #499f73;
}

body {
    background-color: var(--register-bg) !important;
}

.custom-header-bg {
    background: linear-gradient(to right, var(--register-primary-dark), var(--register-primary-light));
    padding: 50px 20px 140px 20px;
    text-align: center;
    color: var(--register-white);
}

.custom-form-card {
    background: var(--register-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 40px 50px;
    max-width: 850px;
    margin: -90px auto 60px auto;
    position: relative;
    z-index: 10;
}

.custom-input {
    background-color: var(--register-input-bg) !important;
    border: 1px solid var(--register-input-border) !important;
    border-radius: 8px;
    padding: 10px 15px;
}

.btn-cancel {
    background-color: var(--register-cancel);
    color: var(--register-white);
    border-radius: 30px;
    padding: 12px 40px;
    font-weight: bold;
    border: none;
    width: 200px;
}

.btn-cancel:hover {
    background-color: var(--register-cancel-hover);
    color: var(--register-white);
}

.btn-submit {
    background-color: var(--register-submit);
    color: var(--register-white);
    border-radius: 30px;
    padding: 12px 40px;
    font-weight: bold;
    border: none;
    width: 200px;
}

.btn-submit:hover {
    background-color: var(--register-submit-hover);
    color: var(--register-white);
}

@media (max-width: 768px) {
    .custom-form-card {
        padding: 30px 20px;
    }
}

/* --------------------------------------------------------------------------
   Processing modal (หลังกดลงทะเบียน)
   -------------------------------------------------------------------------- */
.register-processing-backdrop {
    backdrop-filter: blur(4px);
}

.register-processing-swal.swal2-popup {
    width: min(420px, calc(100vw - 2rem));
    padding: 2rem 1.75rem 1.5rem;
    border-radius: 1.25rem;
    border: 1px solid #e8edf5;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

.register-processing-swal .swal2-html-container {
    margin: 0;
    padding: 0;
    overflow: visible;
}

.register-processing-modal {
    text-align: center;
    color: #334155;
}

.register-processing-modal__visual {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto 1.25rem;
}

.register-processing-modal__icon {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: var(--register-primary);
    font-size: 1.35rem;
    box-shadow: 0 8px 20px rgba(59, 89, 152, 0.18);
    z-index: 2;
}

.register-processing-modal__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--register-primary);
    border-right-color: rgba(59, 89, 152, 0.25);
    animation: register-processing-spin 1.1s linear infinite;
}

.register-processing-modal__ring--inner {
    inset: 10px;
    border-top-color: var(--register-submit);
    border-right-color: rgba(87, 182, 133, 0.2);
    animation-duration: 0.85s;
    animation-direction: reverse;
}

.register-processing-modal__title {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
}

.register-processing-modal__message {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #64748b;
}

.register-processing-modal__steps {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1.1rem;
    text-align: left;
}

.register-processing-step {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    font-size: 0.88rem;
    color: #94a3b8;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.register-processing-step__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.register-processing-step.is-active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
    font-weight: 600;
}

.register-processing-step.is-active .register-processing-step__dot {
    background: var(--register-primary);
    box-shadow: 0 0 0 4px rgba(59, 89, 152, 0.15);
    animation: register-processing-pulse 1.2s ease-in-out infinite;
}

.register-processing-step.is-done {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.register-processing-step.is-done .register-processing-step__dot {
    background: var(--register-submit);
    box-shadow: none;
}

.register-processing-modal__warning {
    margin: 0;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 0.82rem;
    line-height: 1.45;
}

.register-processing-modal__warning i {
    margin-right: 0.35rem;
}

@keyframes register-processing-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes register-processing-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.85;
    }
}
