/**
 * Nearby Hotels Block Styles
 */

/* General Styles */
.nearby-hotels-wrapper {
    padding: 60px 0;
    font-family: var(--font1, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);
}

/* Heading Section */
.nearby-hotels-heading {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto 40px;
}

.nearby-hotels-subtitle {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #666;
}

.nearby-hotels-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #333;
}

.nearby-hotels-description {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Content Layout */
.nearby-hotels-content {
    margin-bottom: 40px;
    display: flex;
    flex-wrap: nowrap;
}

/* Left Column: Hotel Cards */
.nearby-hotels-cards-column {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    background-color: whitesmoke;
    padding: 15px;
    width: 30%;
    /* 30% width for cards column */
    flex: 0 0 30%;
    /* Don't grow or shrink */
}

.nearby-hotels-filter {
    background-color: var(--tertiary);
    padding: 20px;
    /* border-radius: 8px; */
    margin-bottom: 20px;
}

.nearby-hotels-filter label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.nearby-hotels-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    /* border-radius: 5px; */
    background-color: #fff;
    font-size: 1rem;
    color: #333;
    margin-bottom: 15px;
}

#filter-button {
    display: block;
    width: 100%;
    cursor: pointer;
}

.nearby-hotels-cards-container {
    flex: 1;
    overflow-y: auto;
    height: calc(100% - 80px);
    /* Account for filter height */
    padding-right: 10px;
}

/* Scrollbar Styling - Invisible */
.nearby-hotels-cards-container::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.nearby-hotels-cards-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Hotel Card */
.nearby-hotels-card {
    background-color: #fff;
    /* border-radius: 8px; */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    /* Increased padding */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.nearby-hotels-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.nearby-hotels-card.highlighted {
    border: 2px solid var(--primary);
    box-shadow: 0 5px 20px rgba(0, 115, 170, 0.2);
}

.nearby-hotels-card-title {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary);
}

.nearby-hotels-card-distance {
    display: inline-block;
    color: var(--secondary);
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.nearby-hotels-card-address {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    color: #666;
}

.nearby-hotels-card-address i {
    margin-right: 10px;
    margin-top: 4px;
    color: var(--primary);
}

.nearby-hotels-card-notes {
    margin-bottom: 20px;
}

.nearby-hotels-card-notes h4 {
    font-size: 1rem;
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.nearby-hotels-card-notes ul {
    margin: 0;
    padding-left: 20px;
}

.nearby-hotels-card-notes li {
    margin-bottom: 5px;
    color: #666;
}

/* Button Styles */
.btn,
.nearby-hotels-card .btn,
#filter-button,
.map-info-window-button {
    text-decoration: none;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 700;
    text-align: center;
    transition: all .3s ease-in-out;
    text-transform: uppercase;
    font-size: 18px;
    justify-content: center;
    border: 4px solid var(--tertiary);
    transition: all .3s ease-in-out;
    background: transparent;
}

.btn:hover,
.nearby-hotels-card .btn:hover,
#filter-button:hover,
.map-info-window-button:hover {
    background-color: var(--tertiary);
}

.nearby-hotels-card .btn {
    width: 100%;
}

/* Right Column: Map */
.nearby-hotels-map-column {
    height: 100%;
    width: 70%;
    flex: 0 0 70%;
    /* Don't grow or shrink */
}

.nearby-hotels-map {
    /* border-radius: 8px; */
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 100%;
    /* Ensure map takes full height */
}

/* Map Info Window */
.map-info-window {
    padding: 0;
    max-width: 250px;
    /* border-radius: 8px; */
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.map-info-window-content {
    padding: 15px;
    padding-top: 0;
    background-color: #fff;
}

.map-info-window-title {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary);
}

.map-info-window-address {
    margin-bottom: 10px;
    color: #666;
    display: flex;
    align-items: flex-start;
}

.map-info-window-address i {
    color: var(--primary);
    margin-right: 8px;
    margin-top: 4px;
}

.map-info-window-distance {
    display: inline-block;
    background-color: var(--tertiary);
    color: var(--primary);
    padding: 3px 8px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.map-info-window-button {
    margin-top: 10px;
    font-size: 16px;
    min-width: 150px;
    padding: 8px 15px;
}

/* Loading and No Results */
.nearby-hotels-loading,
.nearby-hotels-no-results {
    text-align: center;
    padding: 30px;
    color: #666;
}

/* Admin Settings Panel */
.nearby-hotels-admin-settings {
    margin-bottom: 30px;
    position: relative;
    z-index: 100;
}

.nearby-hotels-admin-settings-toggle {
    text-align: right;
    margin-bottom: 15px;
}

.nearby-hotels-admin-settings-toggle-button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.3s ease;
}

.nearby-hotels-admin-settings-toggle-button:hover {
    background-color: #e0e0e0;
}

.nearby-hotels-admin-settings-toggle-button .dashicons {
    margin-right: 5px;
}

.nearby-hotels-admin-settings-panel {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nearby-hotels-admin-settings-panel h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 18px;
}

.nearby-hotels-admin-settings-section {
    margin-bottom: 25px;
}

.nearby-hotels-admin-settings-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

.nearby-hotels-admin-settings-field {
    margin-bottom: 15px;
}

.nearby-hotels-admin-settings-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

.nearby-hotels-admin-settings-field input[type="text"],
.nearby-hotels-admin-settings-field input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.nearby-hotels-admin-settings-field.checkbox-field {
    display: flex;
    align-items: center;
}

.nearby-hotels-admin-settings-field.checkbox-field input {
    margin-right: 10px;
}

.nearby-hotels-admin-settings-field.checkbox-field label {
    margin-bottom: 0;
}

.nearby-hotels-admin-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Responsive Styles */
@media (max-width: 991px) {

    /* Change layout to vertical stacking */
    .nearby-hotels-content {
        flex-direction: column;
        height: auto !important;
        /* Override inline height */
    }

    .nearby-hotels-cards-column,
    .nearby-hotels-map-column {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    .nearby-hotels-cards-column {
        order: 2;
        margin-top: 30px;
        height: auto;
        min-height: 400px;
    }

    .nearby-hotels-map-column {
        order: 1;
    }

    .nearby-hotels-map {
        height: 400px !important;
        /* Default map height for mobile */
    }

    .nearby-hotels-cards-container {
        height: auto;
        max-height: 400px;
        /* Set a reasonable max height */
        overflow-y: auto;
    }

    .nearby-hotels-heading {
        margin-bottom: 30px;
    }

    .nearby-hotels-title {
        font-size: 2.2rem;
    }

    /* Fix button width on mobile */
    .btn,
    .nearby-hotels-card .btn,
    #filter-button,
    .map-info-window-button {
        min-width: 100%;
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .nearby-hotels-title {
        font-size: 1.8rem;
    }

    .nearby-hotels-card {
        padding: 20px;
    }
}