/**
 * Travel by Minet - Zoekresultaten & Boekpagina Styling
 */

/* ─── VARIABLES ─── */
:root {
    --tbm-green: #153E35;
    --tbm-green-light: #1a4f44;
    --tbm-gold: #CAC61E;
    --tbm-warm-white: #F7F6F1;
    --tbm-sand: #EDE9DD;
    --tbm-text: #2d2d2d;
    --tbm-text-light: #777;
    --tbm-border: #e8e4dd;
    --tbm-radius: 12px;
    --tbm-shadow: 0 2px 16px rgba(21, 62, 53, 0.08);
}

/* ─── SEARCH PAGE LAYOUT ─── */
.tbm-search-page {
    background: var(--tbm-warm-white);
    min-height: 70vh;
}

.tbm-search-hero {
    background: linear-gradient(135deg, var(--tbm-green), var(--tbm-green-light));
    padding: 40px 20px;
    color: #fff;
}

.tbm-search-hero__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.tbm-search-hero h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 24px;
}

/* ─── FILTER BAR ─── */
.tbm-filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.tbm-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tbm-filter-group label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
}

.tbm-filter-input {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    min-width: 140px;
}

.tbm-filter-input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.tbm-filter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.tbm-filter-input option {
    color: #333;
    background: #fff;
}

.tbm-filter-btn {
    background: var(--tbm-gold);
    color: var(--tbm-green);
    border: none;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tbm-filter-btn:hover {
    background: #d8d42a;
    transform: translateY(-1px);
}

.tbm-filter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ─── CONTENT AREA ─── */
.tbm-search-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px;
}

.tbm-search-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.tbm-search-count {
    font-size: 14px;
    color: var(--tbm-text-light);
}

.tbm-search-count strong {
    color: var(--tbm-text);
}

.tbm-sort-select {
    border: 1px solid var(--tbm-border);
    background: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--tbm-text);
    outline: none;
}

/* ─── RESULTS GRID ─── */
.tbm-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* ─── RESULT CARD ─── */
.tbm-card {
    background: #fff;
    border-radius: var(--tbm-radius);
    overflow: hidden;
    box-shadow: var(--tbm-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.tbm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(21, 62, 53, 0.14);
}

.tbm-card__image-wrap {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.tbm-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.tbm-card:hover .tbm-card__image {
    transform: scale(1.05);
}

.tbm-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--tbm-gold);
    color: var(--tbm-green);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.tbm-card__stars {
    position: absolute;
    bottom: 14px;
    left: 14px;
    color: var(--tbm-gold);
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.tbm-card__body {
    padding: 20px;
}

.tbm-card__name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--tbm-text);
    margin: 0 0 6px;
    line-height: 1.3;
}

.tbm-card__location {
    font-size: 13px;
    color: var(--tbm-text-light);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tbm-card__location svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.tbm-card__details {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tbm-card__tag {
    background: var(--tbm-warm-white);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--tbm-text-light);
}

.tbm-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--tbm-border);
}

.tbm-card__price-label {
    font-size: 11px;
    color: var(--tbm-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tbm-card__price {
    font-size: 24px;
    font-weight: 700;
    color: var(--tbm-green);
    line-height: 1;
}

.tbm-card__price small {
    font-size: 13px;
    font-weight: 400;
    color: var(--tbm-text-light);
}

.tbm-card__cta {
    background: var(--tbm-green);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.tbm-card__cta:hover {
    background: var(--tbm-green-light);
    color: #fff;
}

/* ─── LOADING STATE ─── */
.tbm-loading {
    text-align: center;
    padding: 60px 20px;
}

.tbm-loading__spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--tbm-border);
    border-top-color: var(--tbm-green);
    border-radius: 50%;
    animation: tbm-rotate 0.7s linear infinite;
    margin: 0 auto 16px;
}

@keyframes tbm-rotate {
    to { transform: rotate(360deg); }
}

.tbm-loading__text {
    color: var(--tbm-text-light);
    font-size: 15px;
}

/* ─── EMPTY STATE ─── */
.tbm-empty {
    text-align: center;
    padding: 60px 20px;
}

.tbm-empty__icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.tbm-empty__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 24px;
    color: var(--tbm-text);
    margin-bottom: 8px;
}

.tbm-empty__text {
    color: var(--tbm-text-light);
    font-size: 15px;
}

/* ─── PAGINATION ─── */
.tbm-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--tbm-border);
}

.tbm-pagination__btn {
    background: #fff;
    border: 1px solid var(--tbm-border);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--tbm-text);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 44px;
    text-align: center;
}

.tbm-pagination__btn:hover {
    border-color: var(--tbm-green);
    color: var(--tbm-green);
}

.tbm-pagination__btn--active {
    background: var(--tbm-green);
    color: #fff;
    border-color: var(--tbm-green);
}

.tbm-pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ─── ACCOMMODATION DETAIL ─── */
.tbm-detail-page {
    background: var(--tbm-warm-white);
}

.tbm-detail-hero {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.tbm-detail-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tbm-detail-hero__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: #fff;
}

.tbm-detail-hero__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 36px;
    font-weight: 600;
    margin: 0 0 8px;
}

.tbm-detail-hero__location {
    font-size: 15px;
    opacity: 0.85;
}

.tbm-detail-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
}

.tbm-detail-main h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 24px;
    color: var(--tbm-green);
    margin: 0 0 16px;
}

.tbm-detail-main p {
    color: var(--tbm-text);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* Photo gallery */
.tbm-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 32px;
}

.tbm-gallery__item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    height: 120px;
}

.tbm-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.tbm-gallery__item:hover img {
    transform: scale(1.05);
}

/* Facilities */
.tbm-facilities {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.tbm-facility {
    background: #fff;
    border: 1px solid var(--tbm-border);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--tbm-text);
}

/* Sidebar booking */
.tbm-detail-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.tbm-booking-card {
    background: #fff;
    border-radius: var(--tbm-radius);
    padding: 28px;
    box-shadow: var(--tbm-shadow);
}

.tbm-booking-card__price {
    font-size: 32px;
    font-weight: 700;
    color: var(--tbm-green);
    margin-bottom: 4px;
}

.tbm-booking-card__price small {
    font-size: 14px;
    font-weight: 400;
    color: var(--tbm-text-light);
}

.tbm-booking-card__subtitle {
    font-size: 13px;
    color: var(--tbm-text-light);
    margin-bottom: 24px;
}

.tbm-booking-field {
    margin-bottom: 16px;
}

.tbm-booking-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--tbm-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.tbm-booking-field input,
.tbm-booking-field select {
    width: 100%;
    border: 1px solid var(--tbm-border);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.tbm-booking-field input:focus,
.tbm-booking-field select:focus {
    border-color: var(--tbm-green);
}

.tbm-booking-btn {
    width: 100%;
    background: var(--tbm-gold);
    color: var(--tbm-green);
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.tbm-booking-btn:hover {
    background: #d8d42a;
}

.tbm-booking-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tbm-booking-note {
    text-align: center;
    font-size: 12px;
    color: var(--tbm-text-light);
    margin-top: 12px;
}

/* ─── BOOKING BUTTON STATES ─── */
.tbm-booking-btn--loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.tbm-booking-btn--loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.2);
    border-top-color: #153E35;
    border-radius: 50%;
    animation: tbm-spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

/* ─── AVAILABILITY RESULTS ─── */
.tbm-availability-results {
    margin-top: 16px;
    border-top: 1px solid var(--tbm-border, #e5e5e5);
    padding-top: 16px;
}

.tbm-availability-results__title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tbm-green, #153E35);
    margin: 0 0 12px;
}

.tbm-price-option {
    margin-bottom: 12px;
    background: var(--tbm-warm-white, #F7F6F1);
    border-radius: 8px;
    overflow: hidden;
}

.tbm-price-option__header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--tbm-green, #153E35);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.tbm-price-option__tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.tbm-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    gap: 8px;
    transition: background 0.15s;
}

.tbm-price-row:last-child {
    border-bottom: none;
}

.tbm-price-row:hover {
    background: rgba(0,0,0,0.03);
}

.tbm-price-row__date {
    font-size: 13px;
    font-weight: 500;
    color: var(--tbm-text, #2d2d2d);
    white-space: nowrap;
}

.tbm-price-row__flight {
    font-size: 11px;
    color: var(--tbm-text-light, #777);
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tbm-price-row__price {
    font-size: 15px;
    font-weight: 700;
    color: var(--tbm-green, #153E35);
    white-space: nowrap;
}

.tbm-price-row__pp {
    font-size: 10px;
    font-weight: 400;
    color: var(--tbm-text-light, #777);
}

.tbm-price-row__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--tbm-gold, #CAC61E);
    color: var(--tbm-green, #153E35);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.tbm-price-row__action:hover {
    transform: scale(1.1);
}

.tbm-no-availability {
    text-align: center;
    padding: 20px 12px;
    color: var(--tbm-text-light, #777);
    font-size: 13px;
}

.tbm-no-availability__icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.tbm-availability-error {
    text-align: center;
    padding: 16px 12px;
    color: #c0392b;
    font-size: 13px;
    background: #fdf0ef;
    border-radius: 8px;
    margin-top: 12px;
}

/* Detail page - sterren & type badge naast titel */
.tbm-detail-hero__stars {
    color: var(--tbm-gold, #CAC61E);
    font-size: 18px;
    margin-top: 4px;
}

.tbm-detail-hero__type {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    margin-top: 6px;
}

/* ─── AUTOCOMPLETE ─── */
.tbm-autocomplete {
    position: relative;
}

.tbm-autocomplete__results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--tbm-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.tbm-autocomplete__results.active {
    display: block;
}

.tbm-autocomplete__item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--tbm-text);
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}

.tbm-autocomplete__item:hover {
    background: var(--tbm-warm-white);
}

.tbm-autocomplete__item:last-child {
    border-bottom: none;
}

.tbm-autocomplete__item strong {
    color: var(--tbm-green);
}

.tbm-autocomplete__type {
    font-size: 11px;
    color: var(--tbm-text-light);
    text-transform: uppercase;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .tbm-detail-content {
        grid-template-columns: 1fr;
    }

    .tbm-detail-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .tbm-filter-bar {
        flex-direction: column;
    }

    .tbm-filter-input {
        width: 100%;
    }

    .tbm-results-grid {
        grid-template-columns: 1fr;
    }

    .tbm-search-hero h1 {
        font-size: 24px;
    }

    .tbm-detail-hero {
        height: 260px;
    }

    .tbm-detail-hero__title {
        font-size: 26px;
    }

    .tbm-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}
