/* ═══ Trip2Where Auth Modal ═══ */

.t2w-auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.t2w-auth-overlay.visible { opacity: 1; }

.t2w-auth-modal {
    background: #fff;
    border-radius: 20px;
    width: 420px;
    max-width: calc(100vw - 32px);
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
    box-shadow: 0 24px 80px rgba(0,0,0,0.15);
}
.t2w-auth-overlay.visible .t2w-auth-modal {
    transform: translateY(0) scale(1);
}

/* Close */
.t2w-auth-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    transition: all 0.2s;
}
.t2w-auth-close:hover { background: #e5e7eb; }
.t2w-auth-close .material-symbols-outlined { font-size: 20px; }

/* Header */
.t2w-auth-header { text-align: center; margin-bottom: 24px; }
.t2w-auth-icon { font-size: 40px; margin-bottom: 12px; }
.t2w-auth-title { font-size: 20px; font-weight: 800; color: var(--t2w-text, #111827); line-height: 1.4; margin: 0; }
.t2w-auth-subtitle { font-size: 13px; color: #9ca3af; margin-top: 6px; }

/* Tabs */
.t2w-auth-tabs {
    display: flex;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 3px;
    margin-bottom: 20px;
    position: relative;
}
.t2w-auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
    position: relative;
    z-index: 1;
}
.t2w-auth-tab.active { color: #111827; }
.t2w-auth-tab-indicator {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.t2w-auth-tabs[data-active="register"] .t2w-auth-tab-indicator {
    transform: translateX(100%);
}

/* Social buttons */
.t2w-auth-social { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.t2w-auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.t2w-auth-social-btn:hover { border-color: #d1d5db; background: #fafafa; }
.t2w-auth-social--kakao { background: #FEE500; border-color: #FEE500; color: #3C1E1E; }
.t2w-auth-social--kakao:hover { background: #FDDC3F; }
.t2w-auth-social--apple { background: #111; border-color: #111; color: #fff; }
.t2w-auth-social--apple:hover { background: #333; }

/* Divider */
.t2w-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: #9ca3af;
    font-size: 12px;
}
.t2w-auth-divider::before, .t2w-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* Form */
.t2w-auth-field { margin-bottom: 14px; }
.t2w-auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}
.t2w-auth-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 14px;
    transition: all 0.2s;
    background: #fff;
}
.t2w-auth-input-wrap:focus-within {
    border-color: var(--t2w-primary, #FFB700);
    box-shadow: 0 0 0 3px rgba(255,183,0,0.1);
}
.t2w-auth-input-wrap .material-symbols-outlined { font-size: 20px; color: #9ca3af; }
.t2w-auth-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #111827;
    background: transparent;
    font-family: inherit;
}
.t2w-auth-input-wrap input::placeholder { color: #9ca3af; }
.t2w-auth-pw-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    display: flex;
}
.t2w-auth-pw-toggle .material-symbols-outlined { font-size: 20px; }

/* Forgot password */
.t2w-auth-forgot { text-align: right; margin-bottom: 16px; }
.t2w-auth-forgot a { font-size: 12px; color: var(--t2w-primary, #FFB700); text-decoration: none; font-weight: 600; }

/* Terms */
.t2w-auth-terms { margin-bottom: 16px; font-size: 12px; color: #6b7280; }
.t2w-auth-terms a { color: var(--t2w-primary, #FFB700); text-decoration: none; }
.t2w-auth-terms input[type="checkbox"] { margin-right: 6px; }

/* Error */
.t2w-auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #dc2626;
    margin-bottom: 14px;
}

/* Submit */
.t2w-auth-submit {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: var(--t2w-primary, #FFB700);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: inherit;
}
.t2w-auth-submit:hover { background: #E5A400; transform: translateY(-1px); }
.t2w-auth-submit:disabled { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; transform: none; }
.t2w-auth-submit .material-symbols-outlined { font-size: 18px; }

/* Toast */
.t2w-auth-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #111827;
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.t2w-auth-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Shake animation */
@keyframes t2w-shake {
    0%,100% { transform: translateX(0); }
    20%,60% { transform: translateX(-6px); }
    40%,80% { transform: translateX(6px); }
}
.t2w-auth-shake { animation: t2w-shake 0.4s ease; }

/* Mobile: bottom sheet */
@media (max-width: 480px) {
    .t2w-auth-overlay { align-items: flex-end; }
    .t2w-auth-modal {
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 92vh;
        padding: 24px 20px 32px;
        transform: translateY(100%);
    }
    .t2w-auth-overlay.visible .t2w-auth-modal { transform: translateY(0); }
    .t2w-auth-modal::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: #d1d5db;
        border-radius: 2px;
    }
    .t2w-auth-title { font-size: 18px; }
    .t2w-auth-header { margin-bottom: 16px; }
}
