/**
 * VSS Map Modal Styles
 * Fullscreen map view for nearby spots feature
 */

/* ==========================================================================
   Modal Overlay and Container
   ========================================================================== */

.vss-map-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    overflow: hidden;
}

.vss-map-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.vss-map-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95vw;
    height: 90vh;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    z-index: 2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ==========================================================================
   Modal Header
   ========================================================================== */

.vss-map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e4e4e4;
    background: #ffffff;
    flex-shrink: 0;
}

.vss-map-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #171717;
}

.vss-close-modal {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 32px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.vss-close-modal:hover {
    background: #f7f7f7;
    color: #171717;
}

/* ==========================================================================
   Modal Body (Split Layout)
   ========================================================================== */

.vss-map-modal-body {
    display: flex;
    flex-direction: row;
    height: calc(100% - 80px);
    overflow: hidden;
}

/* ==========================================================================
   Left Sidebar (Spots List)
   ========================================================================== */

.vss-map-sidebar {
    width: 30%;
    background: #ffffff;
    border-right: 1px solid #e4e4e4;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    flex-shrink: 0;
}

#vss-map-sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Adjust nearby spot cards for sidebar */
#vss-map-sidebar-content .nearby-spot-card {
    margin-bottom: 0 !important;
}

/* ==========================================================================
   Right Side (Google Map)
   ========================================================================== */

.vss-map-container {
    width: 70%;
    position: relative;
    flex-grow: 1;
    background: #f0f0f0;
}

#vss-nearby-spots-map {
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   View on Maps Button
   ========================================================================== */

.vss-view-map-button {
    background: #00B6BA;
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 182, 186, 0.2);
}

.vss-view-map-button:hover {
    background: #009599;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 182, 186, 0.3);
}

.vss-view-map-button:active {
    transform: translateY(0);
}

.vss-view-map-button svg {
    fill: currentColor;
}

/* ==========================================================================
   Search Here Button
   ========================================================================== */

.vss-search-here-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #E91E63;
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.vss-search-here-button:hover {
    background: #C2185B;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(233, 30, 99, 0.4);
}

.vss-search-here-button:active {
    transform: translateY(0);
}

.vss-search-here-button svg {
    fill: currentColor;
}

/* ==========================================================================
   Loading Overlay
   ========================================================================== */

.vss-map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.vss-map-loading p {
    margin-top: 20px;
    font-size: 16px;
    color: #171717;
    font-weight: 500;
}

/* Loading Spinner */
.vss-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top-color: #00B6BA;
    border-radius: 50%;
    animation: vss-spin 1s linear infinite;
}

@keyframes vss-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Scrollbar Styling
   ========================================================================== */

.vss-map-sidebar::-webkit-scrollbar {
    width: 8px;
}

.vss-map-sidebar::-webkit-scrollbar-track {
    background: #f7f7f7;
}

.vss-map-sidebar::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 4px;
}

.vss-map-sidebar::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* ==========================================================================
   Mobile Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
    .vss-map-modal-content {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    .vss-map-modal-header {
        padding: 15px 20px;
    }

    .vss-map-modal-header h3 {
        font-size: 18px;
    }

    .vss-close-modal {
        width: 36px;
        height: 36px;
        font-size: 28px;
    }

    .vss-map-modal-body {
        flex-direction: column;
    }

    .vss-map-sidebar {
        width: 100%;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid #e4e4e4;
        padding: 15px;
    }

    .vss-map-container {
        width: 100%;
        height: 60vh;
    }

    .vss-search-here-button {
        bottom: 10px;
        right: 10px;
        padding: 10px 16px;
        font-size: 13px;
    }

    .vss-view-map-button {
        padding: 10px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .vss-map-modal-header h3 {
        font-size: 16px;
    }

    .vss-map-sidebar {
        padding: 10px;
    }

    .vss-search-here-button {
        padding: 8px 14px;
        font-size: 12px;
    }

    #vss-map-sidebar-content {
        gap: 12px;
    }
}

/* ==========================================================================
   Tablet Responsive Styles
   ========================================================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    .vss-map-sidebar {
        width: 35%;
    }

    .vss-map-container {
        width: 65%;
    }
}

/* ==========================================================================
   Animation Effects
   ========================================================================== */

@keyframes vss-modal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes vss-modal-scale-in {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.vss-map-modal[style*="display: block"] .vss-map-modal-overlay {
    animation: vss-modal-fade-in 0.3s ease;
}

.vss-map-modal[style*="display: block"] .vss-map-modal-content {
    animation: vss-modal-scale-in 0.3s ease;
}
