/* ========================================
   Footori Search 스타일 v1.4
   풋토리 브랜드 컬러 - 티얼 & 오렌지
   Quick Widget과 동일한 컬러 스킴
   ======================================== */

:root {
    /* Primary - 티얼 계열 */
    --fts-teal: #2D5A5A;
    --fts-teal-light: #5A9A8A;
    --fts-teal-dark: #1E4040;
    
    /* Accent - 오렌지 계열 */
    --fts-orange: #D35F2D;
    --fts-orange-light: #E8845A;
    --fts-orange-dark: #B34820;
    
    /* Neutral */
    --fts-cream: #F5DEB3;
    --fts-white: #ffffff;
}

/* ========================================
   검색창 - 티얼 그라데이션 (Quick Widget과 동일)
   ======================================== */
.fts-search-box {
    background: linear-gradient(135deg, #2D5A5A 0%, #5A9A8A 100%);
    padding: 32px 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 
        0 10px 40px rgba(45, 90, 90, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* 미묘한 광택 효과 */
.fts-search-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.06));
    transform: rotate(25deg);
    pointer-events: none;
}

.fts-search-box > form,
.fts-search-box #fts-search-form {
    position: relative;
    z-index: 1;
}

.fts-search-horizontal #fts-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.fts-search-horizontal .fts-search-filters {
    display: flex;
    gap: 16px;
    flex: 1;
}

.fts-search-horizontal .fts-search-text {
    flex: 1;
    min-width: 200px;
}

/* ========================================
   필드 스타일
   ======================================== */
.fts-search-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
    flex: 1;
}

.fts-search-field label {
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.fts-search-field select,
.fts-search-field input[type="text"] {
    width: 100%;
    height: 50px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.fts-search-field select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D35F2D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    background-color: rgba(255, 255, 255, 0.95);
}

.fts-search-field select:hover,
.fts-search-field input[type="text"]:hover {
    border-color: rgba(211, 95, 45, 0.5);
    background-color: #ffffff;
}

.fts-search-field select:focus,
.fts-search-field input[type="text"]:focus {
    outline: none;
    border-color: #D35F2D;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(211, 95, 45, 0.15);
}

.fts-search-field select:disabled {
    background-color: rgba(255, 255, 255, 0.6);
    color: #999;
    cursor: not-allowed;
    border-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.fts-search-field input[type="text"]::placeholder {
    color: #999;
    font-weight: 400;
}

.fts-search-field-text {
    flex: 1.5;
    min-width: 200px;
}

/* ========================================
   검색 버튼 - 오렌지 그라데이션 (Quick Widget과 동일)
   ======================================== */
.fts-search-submit {
    display: flex;
    align-items: flex-end;
    flex-shrink: 0;
}

.fts-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px;
    padding: 0 32px;
    background: linear-gradient(135deg, #D35F2D 0%, #B34820 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 
        0 4px 15px rgba(211, 95, 45, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.fts-search-btn:hover {
    background: linear-gradient(135deg, #E56B3A 0%, #C55228 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(211, 95, 45, 0.5),
        0 4px 10px rgba(0, 0, 0, 0.15);
}

.fts-search-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(211, 95, 45, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ========================================
   반응형 - 모바일
   ======================================== */
@media (max-width: 992px) {
    .fts-search-box {
        padding: 24px 28px;
    }
    
    .fts-search-horizontal .fts-search-filters {
        flex-wrap: wrap;
    }
    
    .fts-search-field {
        min-width: calc(50% - 8px);
    }
}

@media (max-width: 768px) {
    .fts-search-box {
        padding: 24px 20px;
        border-radius: 16px;
    }
    
    .fts-search-horizontal #fts-search-form {
        flex-direction: column;
        gap: 12px;
    }
    
    .fts-search-horizontal .fts-search-filters {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    
    .fts-search-horizontal .fts-search-text {
        width: 100%;
    }
    
    .fts-search-field {
        width: 100%;
        min-width: 100%;
    }
    
    .fts-search-submit {
        width: 100%;
        margin-top: 8px;
    }
    
    .fts-search-btn {
        width: 100%;
        height: 54px;
        font-size: 17px;
    }
    
    .fts-search-field select,
    .fts-search-field input[type="text"] {
        height: 48px;
    }
}

/* ========================================
   검색 결과 페이지
   ======================================== */
.fts-search-results {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.fts-search-current {
    margin-bottom: 30px;
}

.fts-search-summary {
    font-size: 18px;
    color: #333;
    background: linear-gradient(135deg, #f0f7f6 0%, #e8f4f2 100%);
    padding: 15px 20px;
    border-radius: 12px;
    border-left: 4px solid #2D5A5A;
}

/* ========================================
   섹션 제목 - 티얼
   ======================================== */
.fts-search-courses-section h2,
.fts-search-tours-section h2 {
    font-size: 24px;
    color: #2D5A5A;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0f0ed;
}

/* ========================================
   코스 그리드
   ======================================== */
.fts-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.fts-course-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(45, 90, 90, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e8f0ef;
}

.fts-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(45, 90, 90, 0.15);
    border-color: #5A9A8A;
}

.fts-course-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.fts-course-card .card-image {
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f4f2 0%, #d8ece8 100%);
}

.fts-course-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fts-course-card .card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

.fts-course-card .card-content {
    padding: 15px;
}

.fts-course-card h4 {
    margin: 0 0 8px;
    font-size: 17px;
    color: #2D5A5A;
    font-weight: 700;
}

.fts-course-card .card-area {
    color: #666;
    font-size: 13px;
    margin: 0 0 10px;
}

.fts-course-card .card-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #5A9A8A;
}

.fts-course-card .card-meta span {
    background: #e8f4f2;
    padding: 4px 10px;
    border-radius: 6px;
}

/* ========================================
   코스 상세
   ======================================== */
.fts-course-detail {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(45, 90, 90, 0.12);
    margin-bottom: 30px;
    border: 1px solid #e0f0ed;
}

.fts-course-detail .fts-course-image {
    height: 300px;
    overflow: hidden;
}

.fts-course-detail .fts-course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fts-course-detail .fts-course-info {
    padding: 25px;
}

.fts-course-detail h3 {
    font-size: 26px;
    color: #2D5A5A;
    margin: 0 0 10px;
    font-weight: 800;
}

.fts-course-detail h3 small {
    color: #888;
    font-weight: normal;
    font-size: 18px;
}

.fts-course-detail .subtitle {
    color: #666;
    font-size: 16px;
    margin: 0 0 15px;
}

.fts-course-detail .fts-course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.fts-course-detail .fts-course-meta span {
    background: linear-gradient(135deg, #e8f4f2 0%, #d8ece8 100%);
    color: #2D5A5A;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
}

.fts-course-detail .fts-course-route,
.fts-course-detail .fts-course-highlights {
    background: #f8fbfa;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.6;
    border-left: 3px solid #5A9A8A;
}

.fts-course-detail .fts-course-desc {
    color: #444;
    line-height: 1.8;
}

/* ========================================
   투어/상품 그리드
   ======================================== */
.fts-tours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.fts-tour-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(45, 90, 90, 0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #e8f0ef;
}

.fts-tour-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(45, 90, 90, 0.18);
    border-color: #D35F2D;
}

.fts-tour-card.fts-tour-featured {
    border: 2px solid #D35F2D;
}

.fts-tour-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.fts-tour-card .tour-image {
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.fts-tour-card .tour-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fts-tour-card .tour-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70px;
    background: linear-gradient(135deg, #e8f4f2 0%, #fff5f0 100%);
}

.fts-tour-card .tour-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #D35F2D 0%, #B34820 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(211, 95, 45, 0.3);
}

.fts-tour-card .tour-content {
    padding: 20px;
}

.fts-tour-card .tour-category {
    display: inline-block;
    background: #e8f4f2;
    color: #2D5A5A;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.fts-tour-card h4 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #333;
    line-height: 1.4;
    font-weight: 700;
}

.fts-tour-card .tour-duration {
    color: #666;
    font-size: 14px;
    margin: 0 0 10px;
}

.fts-tour-card .tour-price {
    font-size: 22px;
    font-weight: 800;
    color: #D35F2D;
    margin: 0;
}

/* ========================================
   결과 없음
   ======================================== */
.fts-no-results {
    text-align: center;
    padding: 50px 40px;
    color: #666;
    font-size: 16px;
    background: linear-gradient(135deg, #f8fbfa 0%, #f0f7f6 100%);
    border-radius: 16px;
    border: 1px dashed #c8e0dc;
}

.fts-no-results::before {
    content: '🔍';
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
}

/* ========================================
   모바일 - 결과 페이지
   ======================================== */
@media (max-width: 768px) {
    .fts-courses-grid,
    .fts-tours-grid {
        grid-template-columns: 1fr;
    }
    
    .fts-course-detail .fts-course-info {
        padding: 20px;
    }
    
    .fts-course-detail h3 {
        font-size: 22px;
    }
    
    .fts-course-detail .fts-course-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* ========================================
   로딩 상태
   ======================================== */
.fts-search-field select.loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cstyle%3E.spinner{transform-origin:center;animation:spin 1s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}%3C/style%3E%3Ccircle class='spinner' cx='12' cy='12' r='10' fill='none' stroke='%23D35F2D' stroke-width='3' stroke-dasharray='31.4 31.4'/%3E%3C/svg%3E");
    background-position: calc(100% - 40px) center, right 12px center;
    background-size: 18px, 14px;
}

/* ========================================
   v1.4 - 접기/펴기 섹션
   ======================================== */
.fts-collapsible .fts-section-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    user-select: none;
}

.fts-collapsible .fts-section-toggle:hover {
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
}

.fts-collapsible .fts-toggle-icon {
    font-size: 12px;
    color: var(--fts-teal);
    transition: transform 0.3s ease;
}

.fts-collapsible.fts-collapsed .fts-section-content {
    display: none;
}

.fts-collapsible.fts-collapsed .fts-toggle-icon {
    transform: rotate(-90deg);
}

/* 상품 섹션 강조 */
.fts-search-tours-section {
    margin-bottom: 40px;
}

.fts-search-tours-section h2 {
    color: var(--fts-teal-dark);
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--fts-orange);
}

/* 코스 섹션 (덜 강조) */
.fts-search-courses-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.fts-search-courses-section h2 {
    color: #666;
    font-size: 18px;
}

/* 검색 결과 없음 스타일 개선 */
.fts-no-results {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 12px;
    color: #666;
}

.fts-no-results strong {
    color: var(--fts-orange);
}

.fts-no-results small {
    display: block;
    margin-top: 10px;
    color: #999;
}

/* ========================================
   v1.7 - AI 검색 스타일
   ======================================== */

/* AI 추천 버튼 - 삭제됨 (v1.8에서 버튼 통합) */

/* AI 검색 버튼 스타일 */
.fts-search-box[data-ai-enabled="1"] .fts-search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.fts-search-box[data-ai-enabled="1"] .fts-search-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
}

/* AI 추천 멘트 박스 (검색 결과 페이지) */
.fts-ai-recommendation-box {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 16px;
    border: 2px solid #e0e7ff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.fts-ai-avatar {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.fts-ai-message-content {
    flex: 1;
}

.fts-ai-recommendation-box .fts-ai-recommendation {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin: 0 0 10px 0;
}

.fts-ai-recommendation-box .fts-ai-followup {
    font-size: 14px;
    color: #667eea;
    font-style: italic;
    margin: 0;
}
