/**
 * Another WP Map - Frontend
 *
 * @package AnotherWPMap
 */

/* ==========================================================================
   Fullview Container (Booking.com Style)
   ========================================================================== */

.awpm-fullview-container {
    display: flex;
    width: 100%;
    height: 700px;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    max-width: 1300px;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.awpm-sidebar {
    width: 600px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.awpm-sidebar__list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* ==========================================================================
   Dialog Overlay
   ========================================================================== */

.awpm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.awpm-dialog {
    background: white;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: awpm-dialog-appear 0.2s ease;
}

@keyframes awpm-dialog-appear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.awpm-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.awpm-dialog__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.awpm-dialog__close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.awpm-dialog__close:hover {
    background: #f0f0f0;
    color: #333;
}

.awpm-dialog__content {
    padding: 20px;
}

.awpm-dialog__content p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.awpm-dialog__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
}

.awpm-dialog__btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.awpm-dialog__btn--cancel {
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
}

.awpm-dialog__btn--cancel:hover {
    background: #e5e5e5;
}

.awpm-dialog__btn--confirm {
    background: #0073aa;
    border: 1px solid #0073aa;
    color: white;
}

.awpm-dialog__btn--confirm:hover {
    background: #005a87;
    border-color: #005a87;
}

/* ==========================================================================
   Map Wrapper
   ========================================================================== */

.awpm-map-wrapper {
    flex: 1;
    position: relative;
    min-width: 0;
}

.awpm-map {
    width: 100%;
    height: 100%;
    min-height: 600px;
}

/* ==========================================================================
   Google Maps UI Customization
   ========================================================================== */

/* Zoom Control Container - Äußeres Div */
.awpm-map div[style*="width: 40px"][style*="height: 81px"] {
    border-radius: 8px !important;
    overflow: hidden !important;
}

/* Zoom In Button (Vergrößern) - Oben */
.awpm-map button[aria-label="Vergrößern"],
.awpm-map button[title="Vergrößern"],
.awpm-map button[aria-label="Zoom in"],
.awpm-map button[title="Zoom in"] {
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Zoom Out Button (Verkleinern) - Unten */
.awpm-map button[aria-label="Verkleinern"],
.awpm-map button[title="Verkleinern"],
.awpm-map button[aria-label="Zoom out"],
.awpm-map button[title="Zoom out"] {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

/* Fullscreen Button */
.awpm-map .gm-fullscreen-control {
    border-radius: 8px !important;
}

/* Street View Control - Kreis beibehalten */
.awpm-map .gm-svpc {
    border-radius: 50% !important;
}

/* Fullscreen Button */
.awpm-map button[title="Toggle fullscreen view"],
.awpm-map button[title="Vollbildansicht umschalten"] {
    border-radius: 8px !important;
}

/* ==========================================================================
   Error Message
   ========================================================================== */

.awpm-error {
    padding: 15px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    margin: 20px 0;
}
/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 992px) {
    .awpm-fullview-container {
        flex-direction: column;
        height: 140vh;
        max-height: none;
    }
    
    .awpm-sidebar {
        width: 100%;
        border-right: none;
        border-top: 1px solid #e0e0e0;
        order: 2;
        flex: 1;
        overflow-y: auto;
    }
    
    .awpm-map-wrapper {
        width: 100%;
        order: 1;
        flex: 0 0 40vh;
    }
    
    .awpm-map {
        height: 70vh;
        max-height: 70vh;
        min-height: 300px;
    }
}

@media (max-width: 576px) {    
    .awpm-fullview-container {
        height: 120vh;
    }
    .awpm-map {
        height: 60vh;
        max-height: 60vh;
    }
}