/* 线路详情页面样式 */

.line-detail-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 0;
}

.price-display {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ff6b6b;
}

/* 价格展示区域样式 - 固定显示 */
.price-display-fixed {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.price-display-fixed .price-header {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.price-display-fixed .current-price {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.price-display-fixed .price-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.price-display-fixed .price-info span:last-child {
    font-weight: 500;
}

.itinerary-timeline {
    position: relative;
    padding: 20px 0;
}

.itinerary-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #007bff;
}

.day-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 70px;
}

.day-item::before {
    content: attr(data-day);
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 60px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

/* 预订表单样式优化 - 非嵌入式 */
.booking-form {
    background: transparent;
    border-radius: 0;
    padding: 0;
    position: relative;
    max-height: none;
    overflow: visible;
}

.booking-form h4 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.price-breakdown {
    background: white;
    border-radius: 5px;
    padding: 15px;
    margin-top: 15px;
}

/* 行程内容样式优化 */
.content-text {
    line-height: 1.6;
}

.content-text p {
    margin-bottom: 10px;
}

.content-text p:last-child {
    margin-bottom: 0;
}

.accommodation, .schedule {
    margin-bottom: 20px;
}

.accommodation h6, .schedule h6 {
    color: #007bff;
    margin-bottom: 10px;
    font-weight: 500;
}

.alert-info {
    padding: 15px;
    border-radius: 4px;
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* 选项卡样式 */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    color: #495057;
    background-color: #f8f9fa;
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    margin-right: 5px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: #007bff;
    background-color: #e9ecef;
    border-color: #e9ecef #e9ecef #dee2e6;
}

.nav-tabs .nav-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    font-weight: 500;
}

.nav-tabs .nav-link i {
    margin-right: 5px;
}

/* 线路状态样式 */
.line-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-left: 10px;
}

.status-booking {
    background-color: #28a745;
    color: white;
}

.status-closed {
    background-color: #dc3545;
    color: white;
}

/* 禁用状态样式 */
.booking-disabled {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.booking-disabled::after {
    content: "线路已停收，暂不接受预订";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    z-index: 10;
    white-space: nowrap;
}

/* 简化的日期选择器样式 - 淘宝风格 */
.date-options-simple {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.date-option-card-simple {
    padding: 6px 14px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background-color: #fff;
    color: #495057;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    font-weight: 500;
    flex: 0 0 auto;
    min-width: 70px;
    text-align: center;
}

.date-option-card-simple:hover {
    border-color: #007bff;
    background-color: #e9ecef;
    color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.date-option-card-simple.active {
    border-color: #007bff;
    background-color: #007bff;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}

/* 出发日期选择器样式 */
.date-options {
    display: none;
}

.date-option {
    display: none;
}

.date-option:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.date-option.active {
    border-color: #007bff;
    background-color: #007bff;
    color: white;
}

.date-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.date-option .date {
    font-weight: bold;
    margin-bottom: 5px;
}

.date-option .category {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 3px;
}

.date-option.active .category {
    color: rgba(255, 255, 255, 0.8);
}

.date-option .price {
    color: #ff6b6b;
    font-weight: bold;
}

.date-option.active .price {
    color: white;
}

.date-option .stock {
    font-size: 0.8rem;
    color: #6c757d;
}

.date-option.active .stock {
    color: rgba(255, 255, 255, 0.8);
}

/* 日期选择下拉菜单样式 */
#dateSelect {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#dateSelect:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 模态框中的日期选择卡片样式 - 优化版 */
.date-card-container {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

/* 添加滚动条样式 */
.date-card-container::-webkit-scrollbar {
    width: 8px;
}

.date-card-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.date-card-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.date-card-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.date-option-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.date-option-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.date-option-card.active {
    border-color: #007bff;
    background-color: #007bff;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.date-option-card .card-date {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.date-option-card .card-category {
    font-size: 0.7rem;
    color: #6c757d;
    margin-bottom: 6px;
    padding: 2px 6px;
    background-color: #f8f9fa;
    border-radius: 10px;
    display: inline-block;
}

.date-option-card.active .card-category {
    color: rgba(255, 255, 255, 0.8);
    background-color: rgba(255, 255, 255, 0.2);
}

.date-option-card .card-price {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    margin-top: auto;
}

.date-option-card .price-adult {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 0.85rem;
}

.date-option-card.active .price-adult {
    color: white;
}

.date-option-card .price-child {
    color: #28a745;
    font-weight: bold;
    font-size: 0.75rem;
}

.date-option-card.active .price-child {
    color: rgba(255, 255, 255, 0.9);
}

.date-option-card .card-stock {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 4px;
}

.date-option-card.active .card-stock {
    color: rgba(255, 255, 255, 0.8);
}

/* 分类选择器样式 - 优化版 */
.category-select-container {
    margin-bottom: 15px;
}

.category-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.category-select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 分类按钮样式 - 优化版 */
.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.category-btn {
    padding: 6px 14px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background-color: #fff;
    color: #495057;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    font-weight: 500;
}

.category-btn:hover {
    border-color: #007bff;
    background-color: #e9ecef;
    color: #007bff;
    transform: translateY(-1px);
}

.category-btn.active {
    border-color: #007bff;
    background-color: #007bff;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

/* ===== 无线端响应式优化样式 ===== */

/* 基础移动端优化 - 990px以下 */
@media (max-width: 990px) {
    /* 整体布局优化 */
    .container-fluid {
        padding: 0 !important;
    }
    
    .row {
        margin: 0 !important;
    }
    
    [class*="col-"] {
        padding: 0 !important;
    }
    
    /* 预订表单满屏显示 */
    .booking-form {
        width: 100vw;
        max-width: 100vw;
        margin: 0;
        padding: 15px;
        border-radius: 0;
        background: #f8f9fa;
        box-shadow: none;
    }
    
    /* 标题样式优化 */
    .booking-form h4 {
        background: linear-gradient(135deg, #007bff, #0056b3);
        color: white;
        margin: -15px -15px 20px -15px;
        padding: 15px;
        border-radius: 0;
        font-size: 1.2rem;
        text-align: center;
    }
    
    /* 价格展示优化 */
    .price-display-fixed {
        margin: -15px -15px 20px -15px;
        border-radius: 0;
        padding: 15px;
    }
    
    .price-display-fixed .current-price {
        font-size: 1.8rem;
    }
    
    /* 日期选择器网格布局 */
    .date-options-simple {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 8px;
        margin: 0 -5px 20px -5px;
        padding: 10px;
    }
    
    .date-option-card-simple {
        min-width: auto;
        font-size: 0.8rem;
        padding: 8px 4px;
    }
    
    /* 分类按钮网格布局 */
    .category-buttons {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
        margin: 0 -5px 20px -5px;
        padding: 10px;
    }
    
    .category-btn {
        font-size: 0.8rem;
        padding: 8px 4px;
        text-align: center;
    }
    
    /* 表单控件优化 */
    .booking-form .form-group {
        margin-bottom: 15px;
    }
    
    .booking-form .form-control,
    .booking-form select {
        font-size: 16px !important;
        padding: 12px;
        border-radius: 8px;
    }
    
    /* 数量选择器优化 */
    .input-group {
        width: 100%;
    }
    
    .input-group .form-control {
        text-align: center;
        font-size: 1.1rem;
    }
    
    .input-group .btn {
        padding: 0 15px;
        font-size: 1.2rem;
    }
    
    /* 价格明细优化 */
    .price-breakdown {
        background: white;
        border-radius: 8px;
        margin: 0 -5px 20px -5px;
        padding: 15px;
    }
    
    /* 预订按钮修复 - 移除固定定位 */
    .booking-form .btn-primary {
        width: 100%;
        margin: 20px 0;
        padding: 15px;
        font-size: 1.2rem;
        border-radius: 8px;
        position: relative; /* 改为相对定位 */
        bottom: auto;
        left: auto;
        right: auto;
        z-index: auto;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    /* 模态框优化 */
    .modal-dialog {
        margin: 0;
        max-width: 100vw;
        height: 100vh;
    }
    
    .modal-content {
        border-radius: 0;
        height: 100vh;
    }
    
    /* 日期卡片容器优化 */
    .date-card-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
        margin: 0 -5px 20px -5px;
        padding: 10px;
        max-height: 60vh;
    }
    
    .date-option-card {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
    
    /* 滚动优化 */
    body {
        overflow-x: hidden;
    }
}

/* 小屏手机优化 - 480px以下 */
@media (max-width: 480px) {
    .booking-form {
        padding: 12px;
    }
    
    .booking-form h4 {
        margin: -12px -12px 15px -12px;
        padding: 12px;
        font-size: 1.1rem;
    }
    
    .price-display-fixed {
        margin: -12px -12px 15px -12px;
        padding: 12px;
    }
    
    .price-display-fixed .current-price {
        font-size: 1.6rem;
    }
    
    .date-options-simple {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 6px;
        padding: 8px;
    }
    
    .date-option-card-simple {
        font-size: 0.75rem;
        padding: 6px 2px;
    }
    
    .category-buttons {
        grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
        gap: 6px;
        padding: 8px;
    }
    
    .category-btn {
        font-size: 0.75rem;
        padding: 6px 2px;
    }
    
    .booking-form .form-control,
    .booking-form select {
        font-size: 16px !important;
        padding: 10px;
    }
    
    .booking-form .btn-primary {
        padding: 12px;
        font-size: 1.1rem;
        position: relative; /* 确保相对定位 */
    }
}

/* 超小屏优化 - 375px以下 */
@media (max-width: 375px) {
    .booking-form {
        padding: 10px;
    }
    
    .booking-form h4 {
        margin: -10px -10px 12px -10px;
        padding: 10px;
        font-size: 1rem;
    }
    
    .price-display-fixed {
        margin: -10px -10px 12px -10px;
        padding: 10px;
    }
    
    .price-display-fixed .current-price {
        font-size: 1.4rem;
    }
    
    .date-options-simple {
        grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
        gap: 5px;
        padding: 6px;
    }
    
    .date-option-card-simple {
        font-size: 0.7rem;
        padding: 5px 1px;
    }
    
    .category-buttons {
        grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
        gap: 5px;
        padding: 6px;
    }
    
    .category-btn {
        font-size: 0.7rem;
        padding: 5px 1px;
    }
    
    .booking-form .form-control,
    .booking-form select {
        padding: 8px;
    }
    
    .booking-form .btn-primary {
        padding: 10px;
        font-size: 1rem;
        position: relative; /* 确保相对定位 */
    }
}

/* 横屏模式优化 */
@media (max-width: 990px) and (orientation: landscape) {
    .booking-form {
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .booking-form .btn-primary {
        position: relative;
        bottom: auto;
    }
    
    .date-card-container {
        max-height: 40vh;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .date-option-card-simple,
    .category-btn,
    .booking-form .btn-primary {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .booking-form .form-control,
    .booking-form select {
        min-height: 44px;
    }
}

/* 滚动条优化 */
.booking-form::-webkit-scrollbar {
    width: 4px;
}

.booking-form::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.booking-form::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.booking-form::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}