/**
 * Maximum Club Authentication Page Styles
 * Modern, Minimal, Clean Design
 */

.wwb-auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #f9fafb;
}

.wwb-auth-container {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.wwb-auth-header {
    text-align: center;
    padding: 40px 32px 32px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.wwb-auth-logo {
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wwb-auth-logo img {
    max-width: 210px;
    height: auto;
    display: block;
}

.wwb-auth-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #111827;
    letter-spacing: -0.02em;
}

.wwb-auth-subtitle {
    font-size: 14px;
    margin: 0;
    color: #6b7280;
    font-weight: 400;
}

/* Steps */
.wwb-auth-steps {
    position: relative;
}

.wwb-auth-step {
    padding: 32px;
    display: none;
}

.wwb-auth-step.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wwb-auth-step-content {
    max-width: 100%;
}

.wwb-step-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.wwb-step-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 32px;
    line-height: 1.6;
}

/* Forms */
.wwb-auth-form {
    width: 100%;
}

.wwb-form-group {
    margin-bottom: 24px;
}

.wwb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.wwb-form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.wwb-form-label-optional::after {
    content: ' (اختیاری)';
    font-weight: 400;
    color: #9ca3af;
}

.wwb-form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: #111827;
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.wwb-form-input:focus {
    outline: none;
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
    background: #fff7ed;
}

.wwb-form-input::placeholder {
    color: #9ca3af;
}

/* OTP Container */
.wwb-otp-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 8px;
    direction: ltr;
}

.wwb-otp-box {
    width: 56px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    background: #fef3f2;
    border: 1.5px solid #fecaca;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    direction: ltr;
}

.wwb-otp-box:focus {
    outline: none;
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.15);
    background: #fff7ed;
}

.wwb-otp-box:not(:placeholder-shown) {
    border-color: #fb923c;
    background: #fff7ed;
}

@media (max-width: 640px) {
    .wwb-otp-container {
        gap: 10px;
    }
    
    .wwb-otp-box {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }
}

/* Buttons */
.wwb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 52px;
}

.wwb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wwb-btn-primary {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(251, 146, 60, 0.3);
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.wwb-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s;
}

.wwb-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 6px 18px rgba(251, 146, 60, 0.4);
    transform: translateY(-1px);
}

.wwb-btn-primary:hover:not(:disabled)::before {
    left: 100%;
}

.wwb-btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(251, 146, 60, 0.3);
}

.wwb-btn-block {
    width: 100%;
}

.wwb-btn-text {
    background: transparent;
    color: #6b7280;
    padding: 12px;
    font-weight: 500;
    transition: all 0.15s ease;
    font-size: 15px;
}

.wwb-btn-text:hover {
    background: #f3f4f6;
    color: #111827;
}

.wwb-btn.is-loading {
    pointer-events: none;
}

.wwb-btn-loader {
    display: none;
}

.wwb-btn.is-loading .wwb-btn-loader {
    display: block;
}

.wwb-btn.is-loading .wwb-btn-text {
    display: none;
}

/* Spinner */
.wwb-spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.wwb-spinner-circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 200;
        stroke-dashoffset: -35px;
    }
    100% {
        stroke-dasharray: 90, 200;
        stroke-dashoffset: -124px;
    }
}

/* Messages */
.wwb-message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    display: none;
    line-height: 1.5;
}

.wwb-message.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wwb-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    font-weight: 500;
}

.wwb-message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.wwb-message.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.wwb-message.warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Success Box */
.wwb-success-box {
    text-align: center;
    padding: 24px 0;
}

.wwb-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: #166534;
    background: #f0fdf4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wwb-success-icon svg {
    width: 36px;
    height: 36px;
}

/* Responsive */
@media (max-width: 640px) {
    .wwb-auth-page-wrapper {
        padding: 16px;
        background: #ffffff;
    }

    .wwb-auth-container {
        border-radius: 12px;
        border: none;
        box-shadow: none;
    }

    .wwb-auth-header {
        padding: 32px 24px 24px;
        border-bottom: 1px solid #e5e7eb;
    }

    .wwb-auth-title {
        font-size: 22px;
    }

    .wwb-auth-step {
        padding: 24px;
    }

    .wwb-step-title {
        font-size: 18px;
    }

    .wwb-form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Credit code check result */
.wwb-code-check-result {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.wwb-code-check-result.success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.wwb-code-check-result.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.wwb-code-check-result .wwb-checking {
    color: #374151;
}

.wwb-code-check-result .wwb-success {
    color: #166534;
}

.wwb-code-check-result .wwb-error {
    color: #991b1b;
}

/* Print */
@media print {
    .wwb-auth-page-wrapper {
        background: #ffffff;
    }
}


.wwb-btn-text {
    background: transparent;
    color: #ffffff;
    padding: 12px;
    font-weight: 500;
    transition: all 0.15s 
ease;
    font-size: 15px;
    width: 100%;
}span.wwb-btn-text:hover {
    background: transparent;
}button.wwb-btn.wwb-btn-primary.wwb-btn-block, button.wwb-btn.wwb-btn-primary.wwb-btn-block {
    border-radius: 8px;
}button#wwb-resend-otp-btn {
    background: transparent;
}button#wwb-back-to-phone-btn {
    border-radius: 8px;
    color: #f9761a;
}