/* ═══════════════════════════════════════════════════════════════
   TripFloric — Tours Listing (Phase 8A)
   Experience cards: own component system (.tx-*), not hotel markup.
   Theme gradient: linear-gradient(135deg, #0C5F58 0%, #094B46 100%)
   ═══════════════════════════════════════════════════════════════ */

/* ── Card shell ── */
.tx-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border-light, #e8ecef);
    border-radius: 18px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tx-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(12, 95, 88, .14);
    border-color: rgba(12, 95, 88, .35);
}

/* List variant: horizontal */
.tx-card--list { flex-direction: row; }
.tx-card--list .tx-card-media { width: 300px; min-height: 210px; flex-shrink: 0; }
.tx-card--list .tx-card-body { flex: 1; }
@media (max-width: 720px) {
    .tx-card--list { flex-direction: column; }
    .tx-card--list .tx-card-media { width: 100%; }
}

/* ── Media ── */
.tx-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #0C5F58 0%, #094B46 55%, #134e4a 100%);
    overflow: hidden;
}
.tx-card-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.tx-card:hover .tx-card-media img { transform: scale(1.06); }
.tx-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(circle at 78% 18%, rgba(20, 184, 166, .4), transparent 46%),
        radial-gradient(circle at 15% 85%, rgba(45, 212, 191, .25), transparent 40%),
        linear-gradient(135deg, #0C5F58 0%, #094B46 100%);
}
.tx-card-placeholder i { font-size: 34px; color: rgba(255, 255, 255, .75); }

/* Featured / type badge on image */
.tx-card-badge {
    position: absolute; top: 12px; left: 12px;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px;
    border-radius: 99px;
    font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
    color: #fff; text-transform: uppercase;
    background: linear-gradient(135deg, #0C5F58 0%, #094B46 100%);
    box-shadow: 0 3px 10px rgba(12, 95, 88, .35);
}
.tx-card-type-pill {
    position: absolute; bottom: 12px; left: 12px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 10.5px; font-weight: 700;
    color: #0f172a;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(4px);
}

/* Favorite heart */
.tx-card-fav {
    position: absolute; top: 10px; right: 10px;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border: none; border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #64748b;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
    transition: transform .15s ease, color .15s ease;
}
.tx-card-fav:hover { transform: scale(1.1); color: #e11d48; }
.tx-card-fav.active { color: #e11d48; }

/* ── Body ── */
.tx-card-body {
    display: flex; flex-direction: column;
    gap: 8px;
    padding: 15px 16px 16px;
    flex: 1;
}
.tx-card-title {
    font-family: var(--font-primary, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 15.5px; font-weight: 800; line-height: 1.35;
    color: var(--text-primary, #0f172a);
    text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.tx-card-title:hover { color: var(--primary, #0C5F58); }

/* Meta chips row: duration · difficulty */
.tx-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tx-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px; font-weight: 700;
    background: #E8F4F3;
    color: #094B46;
    border: 1px solid rgba(12, 95, 88, .18);
}
.tx-chip i { font-size: 10px; }
.tx-chip--amber { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.tx-chip--slate { background: #f8fafc; color: #475569; border-color: #e2e8f0; }

/* Location line */
.tx-card-location {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12.5px; font-weight: 600;
    color: var(--text-secondary, #64748b);
    text-decoration: none;
}
.tx-card-location i { color: #0C5F58; font-size: 11px; }

/* Rating row */
.tx-card-rating { display: flex; align-items: center; gap: 7px; }
.tx-rating-pill {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 22px;
    padding: 0 7px;
    border-radius: 7px;
    font-size: 12px; font-weight: 800;
    color: #fff;
    background: #0C5F58;
}
.tx-rating-pill--green { background: #008234; }
.tx-rating-pill--blue { background: #006c9c; }
.tx-rating-pill--amber { background: #d97706; }
.tx-rating-label { font-size: 12px; font-weight: 700; color: var(--text-primary, #0f172a); }
.tx-rating-count { font-size: 12px; color: var(--text-secondary, #64748b); }

/* Trust pills */
.tx-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tx-tag {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700;
    color: #16a34a;
}
.tx-tag i { font-size: 10px; }
.tx-tag--bolt { color: #d97706; }

/* ── Footer: price + CTA ── */
.tx-card-foot {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed var(--border-light, #e8ecef);
    display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
}
.tx-price-block { display: flex; flex-direction: column; gap: 2px; }
.tx-price-next {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700;
    color: var(--text-secondary, #64748b);
}
.tx-price-next i { color: #0C5F58; font-size: 10px; }
.tx-price-next--warn { color: #b45309; }
.tx-price-next--warn i { color: #d97706; }
.tx-price-line { display: flex; align-items: baseline; gap: 5px; }
.tx-price-from { font-size: 11.5px; font-weight: 600; color: var(--text-secondary, #64748b); }
.tx-price-val {
    font-family: var(--font-primary, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 19px; font-weight: 800; color: var(--text-primary, #0f172a);
}
.tx-price-was { font-size: 12px; color: #94a3b8; text-decoration: line-through; }
.tx-price-unit { font-size: 11px; font-weight: 600; color: var(--text-secondary, #64748b); }

.tx-view-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 12.5px; font-weight: 800;
    color: #fff; text-decoration: none;
    background: linear-gradient(135deg, #0C5F58 0%, #094B46 100%);
    box-shadow: 0 4px 12px rgba(12, 95, 88, .25);
    transition: box-shadow .2s ease, transform .2s ease, filter .2s ease;
    white-space: nowrap;
}
.tx-view-btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(12, 95, 88, .35); color: #fff; }
.tx-view-btn--muted {
    background: #f1f5f9; color: #94a3b8;
    box-shadow: none; cursor: default;
    border: 1px solid var(--border-light, #e8ecef);
}
.tx-view-btn--muted:hover { transform: none; filter: none; box-shadow: none; color: #94a3b8; }

/* Unbookable card state */
.tx-card--unbookable { opacity: .82; }
.tx-card--unbookable .tx-card-media img { filter: grayscale(.35); }

/* Grid container for tx cards */
.tx-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.tx-list { display: flex; flex-direction: column; gap: 18px; }

@media (max-width: 640px) {
    .tx-grid { grid-template-columns: 1fr; }
    .tx-card-foot { flex-direction: column; align-items: stretch; }
    .tx-view-btn { justify-content: center; }
}

/* Tour card refinements to match hotel card styling */
.bk-hotel-card .bk-card-score.new { background: #6366f1; }
.tour-btn-action {
    background: linear-gradient(135deg, #0C5F58, #094B46);
    color: #fff;
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 800;
    font-size: 12.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity .2s, transform .2s;
    white-space: nowrap;
}
.tour-btn-action:hover { opacity: .88; transform: translateY(-1px); color: #fff; }
.tour-btn-action.disabled {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    cursor: default;
}

/* ══════════════════════════════════════════════
   Tours Hero Search Bar (.tours-search-form)
   ══════════════════════════════════════════════ */
.tours-search-form {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(15,23,42,.18), 0 2px 8px rgba(15,23,42,.1);
    overflow: visible;
    position: relative;
}
.tsb-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    flex: 1;
    min-width: 0;
    position: relative;
    cursor: default;
    transition: background .15s;
    border-radius: 16px;
}
.tsb-field:hover { background: #f8fafc; }
.tsb-field--active { background: #E8F4F3 !important; }

.tsb-field-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0C5F58, #094B46);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.tsb-field-body { flex: 1; min-width: 0; }
.tsb-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
    margin-bottom: 3px;
    white-space: nowrap;
}
.tsb-input {
    border: none;
    background: transparent;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    width: 100%;
    padding: 0;
    font-family: inherit;
}
.tsb-input::placeholder { color: #94a3b8; font-weight: 500; }
.tsb-value {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tsb-divider {
    width: 1px;
    background: #e2e8f0;
    margin: 10px 0;
    flex-shrink: 0;
}

.tsb-arrow {
    font-size: 10px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform .2s;
    margin-left: 4px;
}
.tsb-arrow--up { transform: rotate(180deg); }

.tsb-clear-dates {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 11px;
    flex-shrink: 0;
}
.tsb-clear-dates:hover { color: #475569; }

/* Tour Type Dropdown */
.tsb-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(15,23,42,.16);
    z-index: 100;
    min-width: 220px;
    padding: 8px;
}
.tsb-type-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: none;
    border-radius: 10px;
    text-align: left;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: background .15s;
}
.tsb-type-opt i:first-child { color: #0C5F58; font-size: 13px; width: 18px; }
.tsb-type-opt:hover, .tsb-type-opt.selected { background: #E8F4F3; color: #094B46; }
.tsb-check { margin-left: auto; color: #0C5F58; font-size: 11px; }

/* Dates Panel */
.tsb-dates-panel {
    min-width: 340px;
    left: 50%;
    transform: translateX(-50%);
}
.tsb-dates-grid {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 4px;
}
.tsb-date-field { flex: 1; }
.tsb-date-label {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
    margin-bottom: 6px;
}
.tsb-date-input {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    transition: border-color .15s;
    font-family: inherit;
}
.tsb-date-input:focus { border-color: #0C5F58; }
.tsb-dates-arrow { color: #94a3b8; font-size: 12px; flex-shrink: 0; }
.tsb-dates-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 8px 8px;
    border-top: 1px solid #f1f5f9;
    margin-top: 8px;
}
.tsb-dates-clear {
    background: none;
    border: none;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 7px 12px;
    border-radius: 8px;
}
.tsb-dates-clear:hover { background: #f1f5f9; }
.tsb-dates-apply {
    background: linear-gradient(135deg, #0C5F58, #094B46);
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.tsb-dates-apply:hover { opacity: .9; }

/* Search Button */
.tsb-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0C5F58, #094B46);
    color: #fff;
    border: none;
    border-radius: 13px;
    padding: 0 26px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    margin: 6px;
    min-height: 52px;
    transition: opacity .2s, transform .2s;
    box-shadow: 0 4px 14px rgba(12, 95, 88,.35);
    font-family: inherit;
}
.tsb-search-btn:hover { opacity: .9; transform: translateY(-1px); }

/* Responsive */
@media (max-width: 860px) {
    .tours-search-form {
        flex-direction: column;
        border-radius: 16px;
    }
    .tsb-divider { width: 100%; height: 1px; margin: 0 10px; }
    .tsb-dropdown, .tsb-dates-panel {
        position: fixed;
        left: 16px !important;
        right: 16px;
        top: auto !important;
        bottom: 0;
        transform: none !important;
        border-radius: 20px 20px 0 0;
        max-height: 70vh;
        overflow-y: auto;
        z-index: 200;
    }
    .tsb-search-btn { margin: 8px 12px 12px; border-radius: 12px; }
    .tsb-dates-panel { min-width: unset; }
}
