/* ──────────────────────────────────────────
 * OnlineSicily Hotel Search — Styles
 * ────────────────────────────────────────── */

/* ── Listing container (boxed, follows page layout) ── */
#listing_custom {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 30px 15px;
    box-sizing: border-box;
}

.os-hotel-search {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    clear: both;
}

/* Prevent hotel search from escaping its container */
.os-hotel-search * {
    box-sizing: border-box;
}

/* Override any theme styles that may cause overlap */
.os-hotel-search .os-results,
.os-hotel-search .os-loading,
.os-hotel-search .os-error,
.os-hotel-search .os-no-results {
    position: relative;
    z-index: 1;
}

/* ── Search form ── */
.os-search-form {
    background: #fff;
    border: 2px solid #D4603A;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.os-search-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
}

.os-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 160px;
}

.os-field--dates {
    flex: 1.5;
    min-width: 220px;
}

.os-field--small {
    flex: 0 0 90px;
    min-width: 80px;
}

.os-field--btn {
    flex: 0 0 auto;
    min-width: auto;
}

.os-field label {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.os-field input {
    border: 2px solid #E8E0D8;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 15px;
    color: #1F2937;
    background: #F9F5F1;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.os-field input:focus {
    border-color: #D4603A;
}

.os-field input::placeholder {
    color: #9CA3AF;
}

.os-btn-search {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: #D4603A;
    color: #fff;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
}

.os-btn-search:hover {
    background: #B84E2C;
}

.os-btn-search:active {
    transform: scale(0.96);
}

/* ── Results ── */
.os-results-info {
    font-size: 14px;
    font-weight: 600;
    color: #D4603A;
    margin-bottom: 16px;
    padding: 8px 16px;
    background: #FEF1EB;
    border-radius: 999px;
    display: inline-block;
}

.os-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* ── Card ── */
.os-card {
    display: block;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s, box-shadow 0.15s;
    text-decoration: none;
    color: inherit;
}

.os-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.os-card-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #E8E0D8;
}

.os-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.os-card-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #9CA3AF;
    background: #F9F5F1;
}

.os-card-body {
    padding: 14px 16px 18px;
}

.os-card-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
    color: #1F2937;
}

.os-card:hover .os-card-name {
    color: #D4603A;
}

.os-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 6px;
}

.os-card-stars,
.os-card-city {
    border: 1px solid #E8E0D8;
    border-radius: 999px;
    padding: 3px 10px;
    background: #F9F5F1;
    white-space: nowrap;
}

.os-card-desc {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.5;
    margin: 0 0 8px;
}

.os-card-rating {
    border: 1px solid #E8E0D8;
    border-radius: 999px;
    padding: 3px 10px;
    background: #F9F5F1;
    white-space: nowrap;
}

.os-card-address {
    font-size: 13px;
    color: #6B7280;
    margin: 4px 0 0;
    line-height: 1.4;
}

.os-card-price {
    margin-top: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #D4603A;
}

/* ── Loading ── */
.os-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6B7280;
}

.os-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #E8E0D8;
    border-top-color: #D4603A;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: os-spin 0.7s linear infinite;
}

@keyframes os-spin {
    to { transform: rotate(360deg); }
}

/* ── Error / No Results ── */
.os-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 14px;
    padding: 16px 20px;
    color: #DC2626;
    font-size: 14px;
}

.os-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6B7280;
    font-size: 15px;
    background: #FFF7ED;
    border: 1px solid #F5A66E;
    border-radius: 14px;
}

/* ── Load More ── */
.os-load-more-wrap {
    text-align: center;
    margin-top: 24px;
}

.os-btn-load-more {
    background: #fff;
    color: #D4603A;
    border: 2px solid #D4603A;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.os-btn-load-more:hover {
    background: #FEF1EB;
}

.os-btn-load-more:disabled {
    opacity: 0.7;
    cursor: wait;
}

.os-btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #D4603A;
    border-top-color: transparent;
    border-radius: 50%;
    animation: os-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}

.os-end-msg {
    text-align: center;
    color: #6B7280;
    font-size: 14px;
    margin-top: 16px;
    padding: 10px;
}

/* ── Responsive: 1 column on mobile ── */
@media (max-width: 767px) {
    .os-search-fields {
        flex-direction: column;
    }

    .os-field,
    .os-field--small,
    .os-field--btn {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .os-btn-search {
        width: 100%;
        justify-content: center;
    }

    .os-results-grid {
        grid-template-columns: 1fr;
    }
}
