/**
 * Airbnb Property Card Styles
 *
 * Styles for the WP Grid Builder custom property card.
 * Designed to match Airbnb's clean, modern aesthetic.
 */

/* ============================================
   Card Container
   ============================================ */
.abnb-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.abnb-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.abnb-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.abnb-card__link:hover,
.abnb-card__link:focus {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   Image Section
   ============================================ */
.abnb-card__image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    border-radius: 12px;
    background: #f0f0f0;
}

.abnb-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.abnb-card:hover .abnb-card__image {
    transform: scale(1.03);
}

/* Badges */
.abnb-card__badge {
    position: absolute;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    padding: 4px 8px;
    line-height: 1;
    z-index: 2;
}

.abnb-card__badge--superhost {
    top: 12px;
    left: 12px;
    background: #fff;
    color: #222;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.abnb-card__badge--photos {
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   Content Section
   ============================================ */
.abnb-card__content {
    padding: 12px 2px;
}

/* Meta top line (type + location) */
.abnb-card__meta-top {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #717171;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.abnb-card__type,
.abnb-card__location {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.abnb-card__separator {
    flex-shrink: 0;
}

/* Title */
.abnb-card__title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #222;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Property specs (guests, beds, baths) */
.abnb-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #717171;
    margin-bottom: 10px;
}

.abnb-card__spec {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.abnb-card__spec svg {
    flex-shrink: 0;
    color: #717171;
}

/* Divider */
.abnb-card__divider {
    height: 1px;
    background: #ebebeb;
    margin-bottom: 10px;
}

/* Price row */
.abnb-card__price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.abnb-card__price {
    font-size: 15px;
    color: #222;
}

.abnb-card__price strong {
    font-weight: 700;
    font-size: 17px;
}

.abnb-card__price-unit {
    font-weight: 400;
    color: #717171;
    font-size: 14px;
}

/* ============================================
   WP Grid Builder Grid Layout Overrides
   ============================================ */
.wpgb-card {
    border: none !important;
    box-shadow: none !important;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .abnb-card__title {
        font-size: 15px;
    }

    .abnb-card__specs {
        gap: 8px;
        font-size: 12px;
    }

    .abnb-card__price strong {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .abnb-card__meta-top {
        font-size: 11px;
    }

    .abnb-card__specs {
        gap: 6px;
    }

    .abnb-card__spec svg {
        width: 12px;
        height: 12px;
    }
}

/* ============================================
   Booking Widget Styles
   ============================================ */
.abnb-booking-widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================
   Facet Filter Styles (WP Grid Builder)
   ============================================ */
.wpgb-facet {
    margin-bottom: 20px;
}

.wpgb-facet-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
    text-transform: none;
}

/* Range slider (price) */
.wpgb-range-slider .noUi-connect {
    background: #ff385c;
}

.wpgb-range-slider .noUi-handle {
    border-color: #ff385c;
    box-shadow: 0 2px 6px rgba(255, 56, 92, 0.3);
}

/* Checkbox facets (amenities, property type) */
.wpgb-checkbox-facet label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
    color: #484848;
    cursor: pointer;
}

.wpgb-checkbox-facet input[type="checkbox"]:checked + span {
    color: #222;
    font-weight: 500;
}

/* Select facets (location, guests) */
.wpgb-select-facet select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #484848;
    background: #fff;
    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='%23717171' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* Search facet */
.wpgb-search-facet input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 40px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.wpgb-search-facet input:focus {
    border-color: #222;
}

/* Reset button */
.wpgb-reset-facet button {
    background: none;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #222;
    cursor: pointer;
    transition: background 0.2s;
}

.wpgb-reset-facet button:hover {
    background: #f7f7f7;
}

/* Results count */
.wpgb-result-count {
    font-size: 14px;
    color: #717171;
    padding: 8px 0;
}

/* Button facets (bedrooms, bathrooms) */
.wpgb-buttons-facet {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wpgb-buttons-facet button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    font-size: 14px;
    color: #484848;
    cursor: pointer;
    transition: all 0.2s;
}

.wpgb-buttons-facet button:hover {
    border-color: #222;
}

.wpgb-buttons-facet button.wpgb-active {
    background: #222;
    color: #fff;
    border-color: #222;
}
