/* ============================================
   路易小姐 SMS 验证码登录 - 弹窗样式
   法式复古风格适配
   ============================================ */

/* --- 右上角登录按钮 --- */
.ml-sms-user-btn {
    position: fixed;
    top: 0.75rem;
    right: 1.5rem;
    z-index: 9998;
    font-family: "Montserrat", Helvetica, Arial, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ml-sms-login-trigger {
    color: var(--ml-charcoal, #2C2C2C) !important;
    text-decoration: none !important;
    padding: 0.4rem 1rem;
    border: 1px solid var(--ml-gold, #C4A35A);
    transition: all 0.3s ease;
    font-size: 0.7rem;
}

.ml-sms-login-trigger:hover {
    background: var(--ml-gold, #C4A35A);
    color: var(--ml-charcoal, #2C2C2C) !important;
}

/* 已登录状态 */
.ml-sms-user-name {
    color: var(--ml-burgundy, #7B2D3E);
    font-size: 0.7rem;
}

.ml-sms-logout-link {
    color: var(--ml-text-light, #6B6B6B) !important;
    text-decoration: none !important;
    font-size: 0.65rem;
}

.ml-sms-logout-link:hover {
    color: var(--ml-burgundy, #7B2D3E) !important;
}

/* --- 弹窗遮罩 --- */
.ml-sms-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.ml-sms-modal.active {
    display: flex;
}

.ml-sms-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 44, 44, 0.5);
    backdrop-filter: blur(4px);
}

/* --- 弹窗内容 --- */
.ml-sms-modal-content {
    position: relative;
    background: var(--ml-cream, #F5F0E8);
    width: 100%;
    max-width: 400px;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: mlSmsFadeIn 0.3s ease;
}

@keyframes mlSmsFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ml-sms-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--ml-text-light, #6B6B6B);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    line-height: 1;
    padding: 0;
}

.ml-sms-modal-close:hover {
    color: var(--ml-burgundy, #7B2D3E);
}

.ml-sms-modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.ml-sms-modal-header h2 {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--ml-charcoal, #2C2C2C);
    margin: 0 0 0.5rem;
    padding-bottom: 0;
}

.ml-sms-modal-header h2::after {
    display: none;
}

.ml-sms-modal-header p {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1rem;
    color: var(--ml-text-light, #6B6B6B);
    margin: 0;
}

/* --- 表单 --- */
.ml-sms-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ml-sms-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ml-sms-form-group label {
    font-family: "Montserrat", Helvetica, Arial, sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ml-text-light, #6B6B6B);
}

.ml-sms-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(196, 163, 90, 0.3);
    background: var(--ml-white, #FFFAF5);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.1rem;
    color: var(--ml-charcoal, #2C2C2C);
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.ml-sms-input:focus {
    outline: none;
    border-color: var(--ml-gold, #C4A35A);
}

.ml-sms-input::placeholder {
    color: #B8B0A8;
    font-size: 0.95rem;
}

/* 验证码行 */
.ml-sms-code-row {
    display: flex;
    gap: 0.75rem;
}

.ml-sms-code-row .ml-sms-input {
    flex: 1;
}

/* --- 按钮 --- */
.ml-sms-btn {
    font-family: "Montserrat", Helvetica, Arial, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.75rem 1.25rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ml-sms-btn-primary {
    background: var(--ml-burgundy, #7B2D3E);
    color: #fff;
    padding: 0.875rem;
    font-size: 0.75rem;
}

.ml-sms-btn-primary:hover {
    background: var(--ml-burgundy-dark, #5A1E2B);
}

.ml-sms-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ml-sms-btn-outline {
    background: transparent;
    border: 1px solid var(--ml-gold, #C4A35A);
    color: var(--ml-gold, #C4A35A);
    min-width: 120px;
    font-size: 0.65rem;
}

.ml-sms-btn-outline:hover {
    background: var(--ml-gold, #C4A35A);
    color: var(--ml-charcoal, #2C2C2C);
}

.ml-sms-btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- 消息 --- */
.ml-sms-message {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 0.95rem;
    text-align: center;
    min-height: 1.5rem;
}

.ml-sms-message.success {
    color: var(--ml-olive, #8B9D6E);
}

.ml-sms-message.error {
    color: var(--ml-burgundy, #7B2D3E);
}

.ml-sms-error {
    font-family: "Montserrat", Helvetica, Arial, sans-serif;
    font-size: 0.65rem;
    color: var(--ml-burgundy, #7B2D3E);
    min-height: 1rem;
}

/* --- 底部 --- */
.ml-sms-modal-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.ml-sms-modal-footer p {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 0.85rem;
    color: var(--ml-text-light, #6B6B6B);
    margin: 0;
}

.ml-sms-modal-footer a {
    color: var(--ml-burgundy, #7B2D3E);
}

/* --- 响应式 --- */
@media (max-width: 768px) {
    .ml-sms-user-btn {
        top: 0.5rem;
        right: 1rem;
    }

    .ml-sms-modal-content {
        margin: 1rem;
        max-width: 100%;
    }

    .ml-sms-code-row {
        flex-direction: column;
    }

    .ml-sms-btn-outline {
        width: 100%;
        padding: 0.6rem;
    }
}

/* 移动端导航菜单打开时隐藏登录按钮 */
@media (max-width: 600px) {
    .ml-sms-user-btn {
        top: 0.4rem;
        right: 0.75rem;
    }
    .ml-sms-login-trigger {
        font-size: 0.6rem;
        padding: 0.3rem 0.75rem;
    }
}

/* --- 内部工具入口链接 --- */
.ml-sms-tools-link {
    color: var(--ml-burgundy, #7B2D3E) !important;
    text-decoration: none !important;
    padding: 0.4rem 0.75rem;
    border: none;
    font-size: 0.7rem;
    font-family: Montserrat, Helvetica, Arial, sans-serif;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.ml-sms-tools-link:hover {
    color: var(--ml-gold, #C4A35A) !important;
}

@media (max-width: 768px) {
    .ml-sms-tools-link {
        font-size: 0.6rem;
        padding: 0.3rem 0.5rem;
    }
}
