/**
 * 装修报价计算器 - 极简单屏版样式
 * 移动端优先 | 一屏完成 | 现代设计
 */

/* ========================================
   CSS 变量
======================================== */
:root {
    --primary-green: #025E49;
    --primary-green-dark: #014435;
    --primary-green-light: #027a5e;
    --text-dark: #2C3E50;
    --text-muted: #7F8C8D;
    --border-color: #E8E8E8;
    --bg-light: #F8F9FA;
    --error-red: #E74C3C;
    --success-green: #27AE60;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-large: 0 8px 32px rgba(0, 0, 0, 0.16);
}

/* ========================================
   弹窗基础结构
======================================== */
.quote-modal-simple {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    align-items: center;
    justify-content: center;
}

.quote-modal-simple.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.quote-modal-overlay-simple {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.quote-modal-content-simple {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    margin: auto;
    background: white;
    border-radius: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-large);
    z-index: 10000;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(40px) scale(0.96);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* 关闭按钮 */
.quote-modal-close-simple {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quote-modal-close-simple:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: rotate(90deg);
}

.quote-modal-close-simple svg {
    color: #666;
}

/* ========================================
   头部区域
======================================== */
.quote-header-simple {
    padding: 32px 24px 24px;
    text-align: center;
    background: linear-gradient(180deg, #F0FDF4 0%, #ffffff 100%);
    border-bottom: 1px solid var(--border-color);
}

.quote-title-simple {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.quote-subtitle-simple {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.highlight-count {
    color: var(--primary-green);
    font-weight: 700;
}

/* ========================================
   主卡片区域
======================================== */
.quote-card-simple {
    padding: 28px 24px 32px;
}

/* 通用标签样式 */
.section-label-simple {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.section-label-simple svg {
    color: var(--primary-green);
}

.optional-tag {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 4px;
}

.required-star {
    color: var(--error-red);
    margin-left: 2px;
}

/* ========================================
   面积选择区
======================================== */
.area-section-simple {
    margin-bottom: 28px;
}

.area-input-wrapper-simple {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    gap: 12px;
}

.area-input-simple {
    width: 140px;
    height: 72px;
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-green);
    text-align: center;
    border: 3px solid var(--border-color);
    border-radius: 16px;
    outline: none;
    transition: all 0.3s;
    background: var(--bg-light);
}

.area-input-simple:focus {
    border-color: var(--primary-green);
    background: white;
    box-shadow: 0 0 0 4px rgba(2, 94, 73, 0.1);
}

.area-unit-simple {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-muted);
}

/* 滑块样式 - 降低视觉权重 */
.area-slider-simple {
    width: 100%;
    height: 6px;
    appearance: none;
    background: #E8E8E8;
    border-radius: 3px;
    outline: none;
    margin-bottom: 16px;
    position: relative;
}

.area-slider-simple::-webkit-slider-track {
    width: 100%;
    height: 6px;
    background: transparent;
    border-radius: 3px;
}

.area-slider-simple::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid var(--primary-green);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s;
}

.area-slider-simple::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(2, 94, 73, 0.25);
}

.area-slider-simple::-webkit-slider-thumb:active {
    transform: scale(1.05);
    background: var(--primary-green);
}

.area-slider-simple::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid var(--primary-green);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s;
}

/* 快捷面积按钮 */
.quick-area-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.quick-area-btn {
    padding: 10px 8px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.quick-area-btn:hover {
    border-color: var(--primary-green);
    color: var(--text-dark);
}

.quick-area-btn.active {
    background: white;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    font-weight: 600;
    padding: 9px 7px;
}

/* ========================================
   价格展示区
======================================== */
.price-display-simple {
    background: linear-gradient(135deg, #025E49 0%, #027a5e 100%);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 28px;
    box-shadow: 0 4px 16px rgba(2, 94, 73, 0.2);
    position: relative;
    overflow: hidden;
}

.price-display-simple::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.price-label-simple {
    flex-shrink: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.price-amount-simple {
    flex: 1;
    font-size: 36px;
    font-weight: 800;
    color: white;
    line-height: 1;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: priceUpdate 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes priceUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.price-per-sqm-badge {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--primary-green);
    background: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.price-per-sqm-badge span {
    font-size: 15px;
    font-weight: 700;
}

/* ========================================
   装修方案选择区
======================================== */
.package-section-simple {
    margin-bottom: 28px;
}

.package-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.package-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px 16px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    position: relative;
}

.package-btn:hover {
    border-color: var(--primary-green);
    background: rgba(2, 94, 73, 0.02);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.package-btn.active {
    background: white;
    border: 3px solid var(--primary-green);
    padding: 17px 15px;
    box-shadow: 0 4px 16px rgba(2, 94, 73, 0.15);
}

.package-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
}

.package-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.package-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    flex: 1;
}

.package-btn.active .package-name {
    color: var(--primary-green);
}

.package-check {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s;
}

.package-btn.active .package-check {
    opacity: 1;
    transform: scale(1);
}

.package-check svg {
    color: white;
}

.package-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.package-btn.active .package-desc {
    color: #666;
}

.package-price-tag {
    font-size: 13px;
    font-weight: 600;
    color: white;
    background: var(--primary-green);
    padding: 4px 10px;
    border-radius: 6px;
    margin-top: 4px;
}

.package-btn.active .package-price-tag {
    background: var(--primary-green);
    color: white;
}

/* 方案说明提示 */
.package-tips {
    background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
    border: 1px solid #FED7AA;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #92400E;
    line-height: 1.5;
}

.tip-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.tip-text {
    flex: 1;
}

.tip-text strong {
    font-weight: 700;
    color: #78350F;
}

/* ========================================
   手机号输入区
======================================== */
.phone-section-simple {
    margin-bottom: 24px;
}

.phone-input-wrapper-simple {
    position: relative;
}

.phone-input-simple {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    font-size: 17px;
    color: var(--text-dark);
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s;
}

.phone-input-simple:focus {
    border-color: var(--primary-green);
    background: white;
    box-shadow: 0 0 0 4px rgba(2, 94, 73, 0.1);
}

.phone-input-simple::placeholder {
    color: #BDC3C7;
}

.wechat-hint {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--text-muted);
    pointer-events: none;
}

.phone-error-simple {
    font-size: 13px;
    color: var(--error-red);
    margin-top: 8px;
    min-height: 18px;
}

/* ========================================
   提交按钮
======================================== */
.submit-btn-simple {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(2, 94, 73, 0.3);
    margin-bottom: 20px;
}

.submit-btn-simple:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 94, 73, 0.4);
}

.submit-btn-simple:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(2, 94, 73, 0.3);
}

.submit-btn-simple:disabled {
    background: #BDC3C7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   信任标签
======================================== */
.trust-badges-simple {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--primary-green);
    font-weight: 500;
}

.trust-badge svg {
    color: var(--primary-green);
}

/* 隐私提示 */
.privacy-text-simple {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.privacy-text-simple svg {
    color: var(--text-muted);
}

/* ========================================
   成功提示 Toast
======================================== */
.success-toast-simple {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 10001;
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: none;
    opacity: 0;
    min-width: 280px;
    text-align: center;
}

.success-toast-simple.show {
    display: block;
    animation: toastShow 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastShow {
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.toast-icon {
    width: 60px;
    height: 60px;
    background: var(--success-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.toast-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.toast-message {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* ========================================
   响应式设计
======================================== */
@media (max-width: 480px) {
    .quote-modal-content-simple {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .quote-header-simple {
        padding: 28px 20px 20px;
    }

    .quote-title-simple {
        font-size: 22px;
    }

    .quote-card-simple {
        padding: 24px 20px 28px;
    }

    .area-input-simple {
        width: 120px;
        height: 64px;
        font-size: 42px;
    }

    .area-unit-simple {
        font-size: 24px;
    }

    .price-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .price-label-simple {
        font-size: 13px;
        width: 100%;
        margin-bottom: -8px;
    }

    .price-amount-simple {
        font-size: 32px;
        flex: none;
        text-align: left;
    }

    .price-per-sqm-badge {
        font-size: 12px;
        padding: 5px 10px;
        flex: none;
    }

    .price-per-sqm-badge span {
        font-size: 13px;
    }

    .quick-area-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .quick-area-btn {
        font-size: 13px;
        padding: 8px 6px;
    }

    .quick-area-btn.active {
        padding: 7px 5px;
    }

    .package-buttons {
        gap: 10px;
    }

    .package-btn {
        padding: 16px 14px;
    }

    .package-btn.active {
        padding: 15px 13px;
    }

    .package-icon {
        font-size: 24px;
    }

    .package-name {
        font-size: 16px;
    }

    .package-check {
        width: 20px;
        height: 20px;
    }

    .package-check svg {
        width: 14px;
        height: 14px;
    }

    .package-desc {
        font-size: 12px;
    }

    .package-price-tag {
        font-size: 12px;
        padding: 3px 8px;
    }

    .package-tips {
        padding: 12px;
    }

    .tip-item {
        font-size: 11px;
    }

    .submit-btn-simple {
        height: 52px;
        font-size: 16px;
    }

    .success-toast-simple {
        min-width: 260px;
        padding: 20px;
    }
}

/* ========================================
   加载动画
======================================== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.submit-btn-simple.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}
