/* 弹窗组件样式 */

/* 弹窗遮罩层 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 弹窗容器 */
.modal {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.7) translateY(50px);
    transition: all 0.3s ease;
    position: relative;
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
}

/* 弹窗头部 */
.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #E9ECEF;
    position: relative;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #F8F9FA;
    color: #333;
}

/* 弹窗内容 */
.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    border-top: 1px solid #E9ECEF;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* 登录弹窗样式 */
/* 登录方式切换标签 */
.login-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    background: #F8F9FA;
    border-radius: 8px;
    padding: 4px;
}

.login-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #666;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-tab.active {
    background: white;
    color: #4A90E2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-tab:hover {
    color: #4A90E2;
}

/* 登录方式表单 */
.login-method-form {
    display: none;
}

.login-method-form.active {
    display: block;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group-modal {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group-modal label {
    font-weight: 500;
    color: #333;
}

.form-group-modal input {
    padding: 12px 16px;
    border: 2px solid #E9ECEF;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group-modal input:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forgot-password {
    color: #4A90E2;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: #666;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #E9ECEF;
}

.login-divider span {
    background: white;
    padding: 0 1rem;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 12px 16px;
    border: 2px solid #E9ECEF;
    border-radius: 8px;
    background: white;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.social-btn:hover {
    border-color: #4A90E2;
    background: #F8F9FA;
}

.social-btn-wechat {
    border-color: #09BB07;
    color: #09BB07;
}

.social-btn-wechat:hover {
    background: #09BB07;
    color: white;
}

.social-btn-qq {
    border-color: #12B7F5;
    color: #12B7F5;
}

.social-btn-qq:hover {
    background: #12B7F5;
    color: white;
}

/* 注册弹窗样式 */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.register-form .form-row {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 0.8rem;
    align-items: end;
}

.verification-btn {
    padding: 12px 16px;
    border: 2px solid #4A90E2;
    background: white;
    color: #4A90E2;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
}

.verification-btn:hover {
    background: #4A90E2;
    color: white;
}

.verification-btn:disabled {
    background: #E9ECEF;
    color: #999;
    border-color: #E9ECEF;
    cursor: not-allowed;
}

.terms-agreement {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.terms-agreement input[type="checkbox"] {
    margin-top: 0.2rem;
}

.terms-agreement a {
    color: #4A90E2;
    text-decoration: none;
}

.terms-agreement a:hover {
    text-decoration: underline;
}

/* 商家入驻弹窗样式 */
.merchant-qr-page {
    text-align: center;
}

.qr-section {
    max-width: 400px;
    margin: 0 auto;
}

.qr-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.qr-title h3 {
    color: #333;
    margin: 0;
}

.qr-code-container {
    margin-bottom: 2rem;
    padding: 2rem;
    background: #F8F9FA;
    border-radius: 15px;
    border: 2px dashed #4A90E2;
}

.qr-code-image {
    width: 200px;
    height: 200px;
    margin-bottom: 1rem;
    border-radius: 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.qr-instruction {
    color: #4A90E2;
    font-weight: 500;
    margin: 0;
}

.merchant-info {
    margin-bottom: 2rem;
    text-align: left;
}

.merchant-info h4 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: #F8F9FA;
    border-radius: 8px;
}

.step-number {
    width: 24px;
    height: 24px;
    background: #4A90E2;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.step-text {
    color: #666;
    font-size: 14px;
}

.merchant-benefits {
    background: #F8F9FA;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.merchant-benefits h4 {
    margin-bottom: 1rem;
    color: #333;
    text-align: center;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    color: #666;
    text-align: left;
}

.contact-tips {
    background: #E8F4FD;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #4A90E2;
}

.contact-tips p {
    margin: 0;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

/* 联系客服弹窗样式 */
.contact-info {
    text-align: center;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.contact-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    border: 2px solid #E9ECEF;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.contact-method:hover {
    border-color: #4A90E2;
    background: #F8F9FA;
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    color: #4A90E2;
}

.contact-title {
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.contact-detail {
    font-size: 14px;
    color: #666;
}

.service-hours {
    background: #E8F4FD;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    font-size: 14px;
    color: #666;
}

/* 响应式弹窗 */
@media (max-width: 767px) {
    .modal {
        width: 95%;
        margin: 1rem;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1.5rem 1rem;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .form-group-modal input {
        font-size: 16px; /* 防止iOS缩放 */
    }

    .register-form .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .verification-btn {
        width: 100%;
    }

         .process-steps {
         grid-template-columns: 1fr;
     }

     .benefits-grid {
         grid-template-columns: 1fr;
     }

     .qr-code-container {
         padding: 1.5rem;
     }

     .qr-section {
         max-width: 100%;
     }

    .contact-methods {
        grid-template-columns: 1fr;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* 弹窗动画效果 */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.7) translateY(50px);
    }
}

.modal-overlay.closing .modal {
    animation: modalSlideOut 0.3s ease forwards;
}

/* 加载状态弹窗 */
.modal-loading {
    text-align: center;
    padding: 2rem;
}

.modal-loading .loading-spinner {
    margin: 1rem auto;
}

.modal-loading p {
    color: #666;
    margin-top: 1rem;
} 