/* ========================================
   SunRoamy Hotels Engine — Styles
   Extends Coastal Premium design system
   ======================================== */

/* ---------- Tabs (inside hero) ---------- */

.sr-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.sr-tab {
    padding: 0.6rem 1.75rem;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: var(--sr-radius-md, 8px);
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.sr-tab:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.sr-tab.active {
    background: rgba(255,255,255,0.95);
    color: var(--sr-ocean-700, #0c5d8f);
    border-color: rgba(255,255,255,0.95);
}

/* ---------- Featured Hotels Grid ---------- */

.sr-featured {
    margin-bottom: 2rem;
}

.sr-featured-title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--sr-heading, #0d1b2a);
    margin: 0 0 1.5rem;
}

.sr-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.sr-featured-card {
    background: #fff;
    border-radius: var(--sr-radius-lg, 12px);
    overflow: hidden;
    box-shadow: var(--sr-shadow-sm, 0 1px 3px rgba(0,0,0,0.08));
    transition: box-shadow 0.2s, transform 0.15s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.sr-featured-card:hover {
    box-shadow: var(--sr-shadow-lg, 0 8px 24px rgba(0,0,0,0.12));
    transform: translateY(-3px);
}

.sr-featured-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: var(--sr-surface, #f3f7fa);
}

.sr-featured-card-img--placeholder {
    background: linear-gradient(135deg, var(--sr-ocean-200, #b8d8e8), var(--sr-ocean-400, #4aa5d4));
}

.sr-featured-card-body {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sr-featured-card-body h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--sr-heading, #0d1b2a);
    line-height: 1.3;
}

.sr-featured-card-location {
    font-size: 0.85rem;
    color: var(--sr-body, #2d3f50);
    margin: 0 0 auto;
    padding-bottom: 0.75rem;
}

.sr-featured-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--sr-border, #dde6ee);
}

.sr-featured-card-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sr-ocean-700, #0c5d8f);
}

.sr-featured-card-price small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--sr-body, #2d3f50);
}

.sr-featured-card-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sr-amber-500, #e8900d);
    white-space: nowrap;
}

/* ---------- Search Form ---------- */

#sr-hotel-search {
    padding-top: 88px; /* clear fixed header (72px) + spacing */
}

.sr-hotel-search-hero {
    position: relative;
    background: linear-gradient(135deg, var(--sr-ocean-900, #0a3554), var(--sr-ocean-700, #0c5d8f));
    background-size: cover;
    background-position: center;
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
    color: #fff;
    border-radius: var(--sr-radius-xl, 16px);
    margin-bottom: 2rem;
    overflow: hidden;
}

/* Photo overlay when background-image is set inline */
.sr-hotel-search-hero[style*="background-image"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,53,84,0.82), rgba(12,93,143,0.75));
    z-index: 0;
    border-radius: inherit;
}

.sr-hotel-search-hero > * {
    position: relative;
    z-index: 1;
}

.sr-hotel-search-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    color: #fff;
}

.sr-hotel-search-hero > p {
    opacity: 0.85;
    margin: 0 0 1.5rem;
    font-size: 1.1rem;
}

.sr-search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    max-width: 960px;
    margin: 0 auto;
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--sr-radius-lg, 12px);
    box-shadow: var(--sr-shadow-xl, 0 10px 40px rgba(0,0,0,0.15));
}

/* Desktop: all fields + button in a single row */
@media (min-width: 1024px) {
    .sr-search-form {
        grid-template-columns: 1.5fr 1fr 1fr 0.7fr 0.7fr auto;
    }

    .sr-search-form .sr-search-btn {
        grid-column: auto;
        align-self: end;
    }
}

.sr-search-form label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sr-ocean-700, #0c5d8f);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.sr-search-form select,
.sr-search-form input[type="text"],
.sr-search-form input[type="date"],
.sr-search-form input[type="number"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--sr-border, #dde6ee);
    border-radius: var(--sr-radius-md, 8px);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--sr-heading, #0d1b2a);
    background: var(--sr-surface, #f3f7fa);
    transition: border-color 0.2s;
}

.sr-search-form select:focus,
.sr-search-form input:focus {
    outline: none;
    border-color: var(--sr-ocean-500, #1a8fd1);
    box-shadow: 0 0 0 3px rgba(26,143,209,0.15);
}

.sr-search-form .sr-search-btn {
    grid-column: 1 / -1;
    padding: 0.85rem 2rem;
    background: var(--sr-amber-500, #e8900d);
    color: #fff;
    border: none;
    border-radius: var(--sr-radius-md, 8px);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.sr-search-form .sr-search-btn:hover {
    background: var(--sr-amber-600, #c9710a);
    transform: translateY(-1px);
}

.sr-search-form .sr-search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ---------- Results ---------- */

.sr-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--sr-border, #dde6ee);
}

.sr-results-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--sr-heading, #0d1b2a);
}

.sr-results-sort select {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--sr-border, #dde6ee);
    border-radius: var(--sr-radius-sm, 4px);
    font-family: inherit;
    font-size: 0.9rem;
}

.sr-results-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.sr-results-filters label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--sr-body, #2d3f50);
    cursor: pointer;
}

/* ---------- Hotel Result Card ---------- */

.sr-hotel-result {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    gap: 1.25rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--sr-border, #dde6ee);
    border-radius: var(--sr-radius-lg, 12px);
    margin-bottom: 1rem;
    transition: box-shadow 0.2s, transform 0.15s;
}

.sr-hotel-result:hover {
    box-shadow: var(--sr-shadow-lg, 0 8px 24px rgba(0,0,0,0.1));
    transform: translateY(-2px);
}

.sr-hotel-result-img {
    width: 220px;
    height: 160px;
    object-fit: cover;
    border-radius: var(--sr-radius-md, 8px);
    background: var(--sr-surface, #f3f7fa);
}

.sr-hotel-result-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--sr-heading, #0d1b2a);
}

.sr-hotel-result-location {
    font-size: 0.85rem;
    color: var(--sr-body, #2d3f50);
    margin-bottom: 0.5rem;
}

.sr-hotel-result-features {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.sr-hotel-result-features span {
    font-size: 0.8rem;
    color: var(--sr-success, #16a34a);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.sr-hotel-result-price {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 140px;
}

.sr-hotel-result-price .sr-price-label {
    font-size: 0.8rem;
    color: var(--sr-body, #2d3f50);
}

.sr-hotel-result-price .sr-price-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--sr-heading, #0d1b2a);
}

.sr-hotel-result-price .sr-price-unit {
    font-size: 0.8rem;
    color: var(--sr-body, #2d3f50);
}

.sr-hotel-result-price .sr-btn {
    margin-top: 0.75rem;
}

/* ---------- Stars ---------- */

.sr-stars {
    color: var(--sr-amber-400, #F7B267);
    font-size: 0.85em;
    letter-spacing: 1px;
}

/* ---------- Hotel Cards (contextual injection) ---------- */

.sr-hotel-cards {
    margin: 3rem 0 2rem;
    padding: 2rem 1.5rem;
    background: var(--sr-surface, #f3f7fa);
    border-radius: var(--sr-radius-xl, 16px);
}

.sr-hotel-cards .sr-section-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.sr-hotel-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.sr-hotel-card {
    background: #fff;
    border-radius: var(--sr-radius-lg, 12px);
    overflow: hidden;
    box-shadow: var(--sr-shadow-sm, 0 1px 3px rgba(0,0,0,0.08));
    transition: box-shadow 0.2s, transform 0.15s;
}

.sr-hotel-card:hover {
    box-shadow: var(--sr-shadow-md, 0 4px 12px rgba(0,0,0,0.1));
    transform: translateY(-3px);
}

.sr-hotel-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--sr-surface, #f3f7fa);
}

.sr-hotel-card-info {
    padding: 1rem 1.25rem 1.25rem;
}

.sr-hotel-card-info h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--sr-heading, #0d1b2a);
}

.sr-hotel-card-location {
    font-size: 0.85rem;
    color: var(--sr-body, #2d3f50);
    margin-bottom: 0.5rem;
}

.sr-hotel-card-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sr-ocean-700, #0c5d8f);
    margin-bottom: 0.75rem;
}

.sr-hotel-card .sr-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
}

.sr-hotel-cards-all {
    display: block;
    text-align: center;
    color: var(--sr-ocean-600, #0e74b0);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}

.sr-hotel-cards-all:hover {
    color: var(--sr-ocean-800, #0a4570);
    text-decoration: underline;
}

/* ---------- Hotel Detail ---------- */

.sr-hotel-detail-header {
    margin-bottom: 2rem;
}

.sr-hotel-detail-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.sr-hotel-detail-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    color: var(--sr-body, #2d3f50);
    font-size: 0.95rem;
}

.sr-hotel-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-radius: var(--sr-radius-lg, 12px);
    overflow: hidden;
    max-height: 400px;
}

.sr-hotel-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sr-hotel-gallery img:first-child {
    grid-row: 1 / 3;
}

/* Room cards */
.sr-room-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--sr-border, #dde6ee);
    border-radius: var(--sr-radius-md, 8px);
    margin-bottom: 0.75rem;
    background: #fff;
    transition: box-shadow 0.2s ease;
}
.sr-room-card:hover {
    box-shadow: var(--sr-shadow-md, 0 4px 16px rgba(6,36,58,.10));
}

.sr-room-card-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
}

.sr-room-card-details {
    font-size: 0.85rem;
    color: var(--sr-body, #2d3f50);
    margin-bottom: 0.2rem;
}

.sr-room-occupancy {
    font-size: 0.85rem;
    color: var(--sr-secondary, #4a5f72);
}

.sr-room-card-price {
    text-align: right;
    flex-shrink: 0;
}

.sr-room-card-price .sr-price-total {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sr-heading, #0d1b2a);
}

.sr-room-card-price .sr-price-pernight {
    font-size: 1.1rem;
    color: var(--sr-heading, #0d1b2a);
    margin-bottom: 0.25rem;
}

.sr-price-amount {
    font-size: 1.35rem;
    font-weight: 800;
}

.sr-price-original {
    color: var(--sr-muted, #7a93a8);
    font-size: 0.85rem;
}

.sr-price-save {
    color: var(--sr-success, #16a34a);
    font-size: 0.8rem;
    font-weight: 600;
}

.sr-tax-badge {
    font-size: 0.75rem;
    color: var(--sr-muted, #7a93a8);
}

/* Hotel detail section spacing */
.sr-hotel-description,
.sr-hotel-map,
.sr-nearby-beaches {
    margin-top: 2rem;
}

/* ---------- Booking Form ---------- */

.sr-booking-summary {
    background: var(--sr-surface, #f3f7fa);
    padding: 1.5rem;
    border-radius: var(--sr-radius-lg, 12px);
    margin-bottom: 2rem;
}

.sr-booking-summary h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.sr-booking-form {
    max-width: 600px;
}

.sr-booking-form .sr-form-group {
    margin-bottom: 1rem;
}

.sr-booking-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sr-heading, #0d1b2a);
    margin-bottom: 0.25rem;
}

.sr-booking-form input[type="text"],
.sr-booking-form input[type="email"],
.sr-booking-form input[type="tel"],
.sr-booking-form textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--sr-border, #dde6ee);
    border-radius: var(--sr-radius-md, 8px);
    font-size: 0.95rem;
    font-family: inherit;
}

.sr-booking-form .sr-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sr-booking-form .sr-terms-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--sr-body, #2d3f50);
    margin: 1.5rem 0;
}

.sr-booking-form .sr-terms-check input {
    margin-top: 0.2rem;
}

/* Payment SDK container */
.sr-payment-container {
    border: 2px solid var(--sr-border, #dde6ee);
    border-radius: var(--sr-radius-lg, 12px);
    padding: 1.5rem;
    margin: 1.5rem 0;
    min-height: 200px;
    background: #fff;
}

/* Confirmation */
.sr-booking-confirmed {
    text-align: center;
    padding: 3rem 1.5rem;
}

.sr-booking-confirmed .sr-check-icon {
    font-size: 3rem;
    color: var(--sr-success, #4ade80);
    margin-bottom: 1rem;
}

.sr-booking-confirmed h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.sr-booking-confirmed .sr-booking-id {
    font-size: 1.1rem;
    color: var(--sr-body, #2d3f50);
    margin-bottom: 2rem;
}

.sr-booking-crosssell {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* ---------- Loading / Error States ---------- */

.sr-loading {
    text-align: center;
    padding: 3rem;
    color: var(--sr-body, #2d3f50);
}

.sr-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--sr-border, #dde6ee);
    border-top-color: var(--sr-ocean-500, #1a8fd1);
    border-radius: 50%;
    animation: sr-spin 0.8s linear infinite;
}

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

.sr-error-msg {
    text-align: center;
    padding: 2rem;
    color: var(--sr-error, #fb7185);
    background: #fef2f2;
    border-radius: var(--sr-radius-md, 8px);
}

.sr-no-results {
    text-align: center;
    padding: 3rem;
    color: var(--sr-body, #2d3f50);
}

/* ---------- Pagination ---------- */

.sr-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.sr-pagination button {
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--sr-border, #dde6ee);
    background: #fff;
    border-radius: var(--sr-radius-sm, 4px);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}

.sr-pagination button.active {
    background: var(--sr-ocean-600, #0e74b0);
    color: #fff;
    border-color: var(--sr-ocean-600, #0e74b0);
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .sr-search-form {
        grid-template-columns: 1fr;
    }

    .sr-hotel-result {
        grid-template-columns: 1fr;
    }

    .sr-hotel-result-img {
        width: 100%;
        height: 200px;
    }

    .sr-hotel-result-price {
        text-align: left;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        min-width: auto;
    }

    .sr-hotel-gallery {
        grid-template-columns: 1fr;
        max-height: 250px;
    }

    .sr-hotel-gallery img:first-child {
        grid-row: auto;
    }

    .sr-booking-form .sr-form-row {
        grid-template-columns: 1fr;
    }

    .sr-featured-grid {
        grid-template-columns: 1fr;
    }

    .sr-tab {
        padding: 0.7rem 1.25rem;
        font-size: 0.9rem;
    }

    .sr-hotel-cards-grid {
        grid-template-columns: 1fr;
    }

    .sr-room-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .sr-room-card-price {
        text-align: left;
        width: 100%;
    }

    .sr-room-card-price .sr-btn {
        width: 100%;
    }
}
