/* ============================================================
   Tribute Auth Modal — Login / Register / OTP / Email Verify
   ============================================================ */

/* Overlay */
#tributeAuthOverlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 15px;
}
#tributeAuthOverlay.active {
    display: flex;
}

/* Modal Box */
.tribute-auth-modal {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: tributeModalIn 0.3s ease;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
@keyframes tributeModalIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)     scale(1);    }
}

/* Modal Header */
.tribute-auth-header {
    background: #DD183B;
    padding: 20px 25px 15px;
    position: relative;
}
.tribute-auth-header h2 {
    color: #ffffff;
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}
.tribute-auth-header p {
    color: rgba(255, 255, 255, 0.8);
    margin: 4px 0 0;
    font-size: 13px;
}
.tribute-auth-close {
    position: absolute;
    top: 15px; right: 18px;
    font-size: 26px;
    color: #ffffff;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    background: none;
    border: none;
    padding: 0;
}
.tribute-auth-close:hover { opacity: 1; }

/* Tabs */
.tribute-auth-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    background: #fafafa;
}
.tribute-auth-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.tribute-auth-tab.active {
    color: #DD183B;
    border-bottom-color: #DD183B;
}
.tribute-auth-tab:hover { color: #DD183B; }

/* Body */
.tribute-auth-body {
    padding: 25px;
}

/* Steps */
.tribute-auth-step { display: none; }
.tribute-auth-step.active { display: block; }

/* Form Groups */
.tribute-auth-group {
    margin-bottom: 16px;
}
.tribute-auth-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
}
.tribute-auth-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.tribute-auth-group input:focus {
    border-color: #DD183B;
    box-shadow: 0 0 0 3px rgba(221, 24, 59, 0.1);
}

/* Submit Button */
.tribute-auth-btn {
    width: 100%;
    padding: 12px;
    background: #DD183B;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}
.tribute-auth-btn:hover { background: #bb1432; }
.tribute-auth-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Loading spinner inside button */
.tribute-auth-btn .spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tributeSpin 0.6s linear infinite;
    display: none;
}
.tribute-auth-btn.loading .spinner { display: inline-block; }
.tribute-auth-btn.loading .btn-text { display: none; }
@keyframes tributeSpin {
    to { transform: rotate(360deg); }
}

/* Messages */
.tribute-auth-message {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 15px;
    display: none;
}
.tribute-auth-message.error {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5c6cb;
    display: block;
}
.tribute-auth-message.success {
    background: #eafaf1;
    color: #1e8449;
    border: 1px solid #c3e6cb;
    display: block;
}

/* Step 2 — Email verify */
.tribute-verify-info {
    text-align: center;
    padding: 10px 0;
}
.tribute-verify-info .verify-icon {
    font-size: 48px;
    color: #DD183B;
    margin-bottom: 15px;
}
.tribute-verify-info h3 {
    font-size: 18px;
    color: #333;
    margin: 0 0 8px;
}
.tribute-verify-info p {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px;
}
.tribute-verify-info .email-highlight {
    font-weight: 700;
    color: #333;
}
.tribute-resend-link {
    background: none;
    border: none;
    color: #DD183B;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    text-decoration: underline;
}

/* Step 3 — OTP */
.tribute-otp-info {
    text-align: center;
    margin-bottom: 20px;
}
.tribute-otp-info .otp-icon {
    font-size: 48px;
    color: #DD183B;
    margin-bottom: 10px;
}
.tribute-otp-info h3 {
    font-size: 18px;
    color: #333;
    margin: 0 0 6px;
}
.tribute-otp-info p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* OTP Input boxes */
.tribute-otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}
.tribute-otp-inputs input {
    width: 46px;
    height: 52px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    color: #333;
    transition: border-color 0.2s;
}
.tribute-otp-inputs input:focus {
    border-color: #DD183B;
    box-shadow: 0 0 0 3px rgba(221, 24, 59, 0.1);
}

/* OTP Timer */
.tribute-otp-timer {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-top: 12px;
}
.tribute-otp-timer span { color: #DD183B; font-weight: 600; }
.tribute-otp-resend {
    background: none;
    border: none;
    color: #DD183B;
    cursor: pointer;
    font-size: 13px;
    text-decoration: underline;
    display: none;
}

/* Forgot password link */
.tribute-forgot-link {
    text-align: right;
    margin-top: -8px;
    margin-bottom: 14px;
}
.tribute-forgot-link button {
    background: none;
    border: none;
    color: #DD183B;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* Divider */
.tribute-auth-divider {
    text-align: center;
    color: #aaa;
    font-size: 12px;
    margin: 15px 0;
    position: relative;
}
.tribute-auth-divider::before,
.tribute-auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: #eee;
}
.tribute-auth-divider::before { left: 0; }
.tribute-auth-divider::after  { right: 0; }

/* Mobile responsive */
@media (max-width: 480px) {
    .tribute-auth-body { padding: 18px; }
    .tribute-auth-modal { border-radius: 10px; }
    .tribute-otp-inputs input {
        width: 40px;
        height: 46px;
        font-size: 18px;
    }
}