/**
 * 移动端样式
 * 
 * 移动端优先设计，简洁现代风格
 * 
 * @author System
 * @version 1.0.0
 */

/* ========== 基础样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
                 "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", 
                 "Microsoft YaHei", sans-serif;
    background: #f5f5f5;
    color: #323233;
    line-height: 1.6;
    min-height: 100vh;
}

/* ========== 容器 ========== */
.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 16px;
}

.page-wrapper {
    min-height: 100vh;
    background: #f5f5f5;
}

/* ========== 顶部导航栏 ========== */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-content {
    max-width: 750px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-logo img {
    height: 32px;
    width: auto;
}

/* ========== 卡片 ========== */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #323233;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ebedf0;
}

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: #646566;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-label .required {
    color: #ee0a24;
    margin-left: 4px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 15px;
    color: #333;
    background: #fafafa;
    outline: none;
    transition: all 0.3s;
}

.form-textarea {
    height: auto;
    min-height: 90px;
    padding: 14px 16px;
    resize: vertical;
    line-height: 1.6;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #c8c9cc;
}

.form-hint {
    font-size: 12px;
    color: #969799;
    margin-top: 4px;
    line-height: 1.4;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.radio-item {
    flex: 1;
    position: relative;
}

.radio-item input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-label {
    display: block;
    padding: 14px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-align: left;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.radio-item input[type="radio"]:checked + .radio-label {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #f5f0ff 100%);
    color: #667eea;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* 可折叠区域 */
.collapsible {
    margin-bottom: 16px;
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 8px 0;
}

.collapsible-header .icon {
    transition: transform 0.3s;
}

.collapsible.active .collapsible-header .icon {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
}

.collapsible.active .collapsible-content {
    max-height: 500px;
}

/* ========== 按钮 ========== */
.btn {
    display: block;
    width: 100%;
    height: 48px;
    line-height: 48px;
    text-align: center;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #1989fa 0%, #1890ff 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(25, 137, 250, 0.3);
}

.btn-primary:active {
    opacity: 0.8;
    transform: translateY(1px);
}

.btn-success {
    background: linear-gradient(135deg, #07c160 0%, #06ae56 100%);
    color: #fff;
}

.btn-default {
    background: #f7f8fa;
    color: #646566;
}

.btn-outline {
    background: #fff;
    color: #1989fa;
    border: 1px solid #1989fa;
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-group .btn {
    flex: 1;
}

/* ========== 价格显示 ========== */
.price-display {
    background: linear-gradient(135deg, #fff8e1 0%, #ffe4b5 100%);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    margin-bottom: 20px;
}

.price-label {
    font-size: 14px;
    color: #646566;
    margin-bottom: 8px;
}

.price-value {
    font-size: 36px;
    font-weight: 700;
    color: #ff6b00;
}

.price-unit {
    font-size: 20px;
}

/* ========== 客服按钮 ========== */
.customer-btn {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #1989fa 0%, #1890ff 100%);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(25, 137, 250, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s;
    animation: breathe 2s ease-in-out infinite;
}

.customer-btn:active {
    transform: scale(0.95);
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ========== 客服弹窗 ========== */
.customer-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    animation: fadeIn 0.3s;
}

.customer-mask.show {
    display: block;
}

.customer-popup {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -100%;
    max-width: 750px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px 16px 0 0;
    z-index: 1001;
    transition: bottom 0.3s ease-out;
    max-height: 80vh;
    overflow-y: auto;
}

.customer-popup.show {
    bottom: 0;
}

.customer-header {
    padding: 16px;
    border-bottom: 1px solid #ebedf0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}

.customer-title {
    font-size: 18px;
    font-weight: 600;
    color: #323233;
}

.customer-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #969799;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
}

.customer-body {
    padding: 20px;
}

.customer-avatar {
    text-align: center;
    margin-bottom: 20px;
}

.customer-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.customer-avatar-name {
    margin-top: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #323233;
}

.contact-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ebedf0;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-label {
    font-size: 14px;
    color: #969799;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-value {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-text {
    flex: 1;
    font-size: 16px;
    color: #323233;
    font-weight: 500;
}

.btn-copy {
    padding: 6px 16px;
    background: #1989fa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-copy:active {
    opacity: 0.8;
}

.contact-qrcode {
    margin-top: 12px;
    text-align: center;
}

.contact-qrcode img {
    width: 200px;
    height: 200px;
    border: 1px solid #ebedf0;
    border-radius: 8px;
}

.work-time {
    background: #f7f8fa;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.work-time-label {
    font-size: 14px;
    color: #969799;
    margin-bottom: 4px;
}

.work-time-value {
    font-size: 14px;
    color: #323233;
}

/* ========== 结果展示 ========== */
.result-success {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #07c160 0%, #06ae56 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 36px;
}

.order-no {
    font-size: 14px;
    color: #969799;
    margin-bottom: 20px;
}

.order-no-value {
    color: #323233;
    font-weight: 500;
    margin-left: 4px;
}

.link-display {
    background: #f7f8fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    word-break: break-all;
    font-size: 14px;
    color: #323233;
    line-height: 1.6;
}

.qrcode-display {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 16px;
}

.qrcode-display img {
    width: 200px;
    height: 200px;
    border: 1px solid #ebedf0;
}

/* ========== 订单查询 ========== */
.order-item {
    padding: 12px;
    background: #f7f8fa;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.order-item-info {
    flex: 1;
}

.order-item-no {
    font-size: 14px;
    color: #323233;
    font-weight: 500;
}

.order-item-time {
    font-size: 12px;
    color: #969799;
    margin-top: 4px;
}

.btn-view {
    padding: 6px 16px;
    background: #1989fa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

/* ========== 说明区域 ========== */
.info-section {
    margin-top: 20px;
}

.info-title {
    font-size: 16px;
    font-weight: 600;
    color: #323233;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid #1989fa;
}

.info-list {
    list-style: none;
    padding-left: 0;
}

.info-list li {
    padding: 8px 0;
    font-size: 14px;
    color: #646566;
    line-height: 1.6;
}

.info-list li::before {
    content: "·";
    margin-right: 8px;
    color: #1989fa;
    font-weight: bold;
}

/* ========== 底部链接 ========== */
.footer-links {
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
}

.footer-link {
    display: inline-block;
    padding: 8px 20px;
    color: #1989fa;
    text-decoration: none;
    font-size: 14px;
    border-radius: 20px;
    background: #e6f2ff;
    margin: 4px;
}

/* ========== 加载动画 ========== */
.loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1989fa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    color: #969799;
}

/* ========== 消息提示 ========== */
.message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 20px 24px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.8;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 9999;
    animation: fadeIn 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-align: left;
}

.message.fade-out {
    animation: fadeOut 0.3s;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ========== 响应式 ========== */
@media (min-width: 768px) {
    .customer-btn {
        right: calc(50% - 375px + 20px);
    }
    
    .customer-popup {
        left: calc(50% - 375px);
        right: calc(50% - 375px);
        width: 750px;
    }
}

