/* 行程单页面特定样式 */

.back-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--text-color);
}

.itinerary-main {
    max-width: 900px;
    margin: 0 auto;
}

/* 配置区域 */
.config-section {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    animation: fadeInUp 0.5s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.config-section h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-color);
    font-weight: 600;
    border-left: 4px solid var(--text-color);
    padding-left: 12px;
}

.section-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* 表单元素 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-color);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
}

.form-group input:hover:not(:focus),
.form-group textarea:hover:not(:focus) {
    border-color: #d1d5db;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* 选项卡片网格 */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.option-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-color);
}

.option-card:hover {
    border-color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.option-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.option-card input[type="checkbox"]:checked ~ .option-icon,
.option-card input[type="checkbox"]:checked ~ .option-title {
    color: var(--text-color);
}

.option-card input[type="checkbox"]:checked {
    & + .option-icon {
        transform: scale(1.1);
    }
}

.option-card:has(input:checked) {
    border-color: var(--text-color);
    background: var(--hover-bg);
    box-shadow: var(--shadow);
}

.option-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.option-title {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

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

.radio-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-color);
}

.radio-item:hover {
    border-color: var(--text-secondary);
    background: var(--hover-bg);
}

.radio-item input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.radio-item:has(input:checked) {
    border-color: var(--text-color);
    background: var(--hover-bg);
    font-weight: 600;
}

/* 文本域已在表单元素中统一定义 */

/* 必填和选填标记 */
.required {
    color: #ef4444;
    font-weight: 600;
}

.optional {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 400;
}

/* 按钮 */
.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 32px 0;
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--hover-bg);
    border-color: var(--text-secondary);
}

.btn-copy {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

/* 结果区域 */
.result-section {
    animation: fadeInUp 0.6s ease-out;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.result-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.itinerary-result {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    line-height: 1.6;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 600px;
    overflow-y: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    text-align: left;
}

/* 标题 */
.itinerary-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 12px 0 6px 0;
}

.itinerary-title:first-child {
    margin-top: 0;
}

/* 行程编号 */
.order-number {
    color: #dc2626;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-block;
}

/* 字段标签 */
.field-label {
    color: #374151;
    font-weight: 600;
}

.result-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

/* Toast 提示 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-color);
    color: var(--bg-color);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    font-weight: 500;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 响应式 */
@media (max-width: 768px) {
    .config-section {
        padding: 24px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .options-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }

    .option-card {
        padding: 20px 12px;
    }

    .option-icon {
        font-size: 1.75rem;
    }

    .option-title {
        font-size: 0.85rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .result-header {
        flex-direction: column;
        align-items: stretch;
    }

    .result-header .btn-copy {
        width: 100%;
    }

    .itinerary-result {
        padding: 20px;
        font-size: 0.9rem;
    }

    .result-footer {
        flex-direction: column;
    }

    .result-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    .config-section {
        background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
    }
    
    .itinerary-result {
        background: #1f1f1f;
        border-color: #374151;
    }
    
    .form-group input[type="text"],
    .form-group input[type="date"],
    .form-group input[type="time"],
    .form-group input[type="number"],
    .form-group input[type="tel"],
    .form-group textarea {
        background: #2a2a2a;
        border-color: #374151;
        color: #e5e7eb;
    }
    
    .form-group input:focus,
    .form-group textarea:focus {
        border-color: #3b82f6;
        background: #2a2a2a;
    }
    
    .form-group input::placeholder,
    .form-group textarea::placeholder {
        color: #6b7280;
    }
    
    .itinerary-title {
        color: #e5e7eb;
    }
    
    .order-number {
        color: #f87171;
    }
    
    .field-label {
        color: #d1d5db;
    }
    
    .btn-primary {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    }
    
    .btn-copy {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    }
}
