#kodukohviku-map-container {
    width: 100%;
    margin: 20px 0;
}

#kodukohviku-map-container.hidden {
    display: none;
}

.kodukohviku-map-toggle {
    /* Theme-friendly button styling - inherit theme colors */
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    /* Minimal fallback styling if theme provides no button styles */
    border: 1px solid currentColor;
    background: transparent;
    text-decoration: none;
    display: inline-block;
}

.kodukohviku-map-toggle:hover {
    /* Let theme handle hover states without transparency */
}


/* Button alignment classes */
.kodukohviku-button-left {
    text-align: left;
    display: block;
    margin-left: 0;
    margin-right: auto;
}

.kodukohviku-button-center {
    text-align: center;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.kodukohviku-button-right {
    text-align: right;
    display: block;
    margin-left: auto;
    margin-right: 0;
}

.kodukohviku-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

#kodukohviku-map {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.leaflet-popup-content h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: bold;
}

.leaflet-popup-content .description {
    margin: 8px 0;
    color: #666;
    line-height: 1.4;
}

.leaflet-popup-content .status {
    font-weight: bold;
    margin-bottom: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    font-size: 12px;
    text-transform: uppercase;
}

.leaflet-popup-content .status.active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.leaflet-popup-content .status.closed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.leaflet-popup-content .timer {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-weight: bold;
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
    border: 1px solid #bbdefb;
}

.leaflet-popup-content .event-info {
    background: #fff3cd;
    color: #856404;
    padding: 6px 10px;
    border-radius: 4px;
    margin-top: 6px;
    font-size: 13px;
    border: 1px solid #ffeaa7;
}

.kodukohviku-popup-content {
    min-width: 200px;
}

/* Menu Button Styling */
.menu-button-container {
    margin-top: 10px;
    text-align: center;
}

.menu-button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.menu-button:hover {
    background: #45a049;
}

/* Menu Modal Styling */
.kodukohviku-menu-modal {
    display: none;
    position: fixed;
    z-index: 1000000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.kodukohviku-menu-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    max-height: none !important;
    overflow-y: visible !important;
}

.kodukohviku-menu-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000001;
}

.kodukohviku-menu-close:hover,
.kodukohviku-menu-close:focus {
    color: #000;
}

.menu-modal-body {
    padding: 20px;
    padding-top: 40px;
}

.menu-modal-body h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 24px;
}

.menu-modal-body p {
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

.menu-content {
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    line-height: 1.6;
    color: #333;
}

.menu-content img {
  max-width: 90% !important;
  height: auto !important;
  display: block;
  margin: 0 auto;
}


/* Pin icon styling moved to print media query since leaflet-easyPrint handles print styling */


/* Fullscreen functionality */
.kodukohviku-map-inner {
    position: relative;
}

.kodukohviku-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.kodukohviku-fullscreen-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.kodukohviku-fullscreen-btn .fullscreen-icon {
    font-size: 14px;
    font-weight: bold;
}

.kodukohviku-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kodukohviku-close-fullscreen {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000000;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kodukohviku-close-fullscreen:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.kodukohviku-close-fullscreen span {
    font-weight: bold;
    line-height: 1;
}

[id$="-fullscreen-map"] {
    width: 100%;
    height: 100%;
    flex: 1;
}

/* Hide scrollbars when in fullscreen */
body.kodukohviku-fullscreen-active {
    overflow: hidden;
}

/* Mobile responsive fullscreen button */
@media (max-width: 768px) {
    .kodukohviku-fullscreen-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .kodukohviku-fullscreen-btn .fullscreen-text {
        display: none;
    }
    
    .kodukohviku-fullscreen-btn .fullscreen-icon {
        font-size: 16px;
    }
    
    .kodukohviku-close-fullscreen {
        width: 35px;
        height: 35px;
        font-size: 16px;
        top: 10px;
        right: 10px;
    }
}

/* Animation for fullscreen transition */
.kodukohviku-fullscreen-overlay.active {
    opacity: 1;
}

/* leaflet-easyPrint styling - customize if needed */
.leaflet-control-easyPrint {
    margin-top: 10px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
}

.leaflet-control-easyPrint a {
    background: #fff;
    color: #333;
    display: block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    margin: 0;
    padding: 0;
    font-size: 16px;
}

.leaflet-control-easyPrint a:hover {
    background: #f4f4f4;
    color: #000;
}

/* Style the print button icons properly */
.leaflet-control-easyPrint .CurrentSize {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iIzMzMyI+PHBhdGggZD0iTTE5IDhoLTFWM0g2djVINXYxMGgxNFY4em0tMiAwSDd2LTRIOS41aDkuNXYyem0wIDEwSDdWMTBoMTB2OHoiLz48L3N2Zz4=');
}

.leaflet-control-easyPrint .A4Portrait {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iIzMzMyI+PHBhdGggZD0iTTE5IDNoLTFWMmMwLTEuMS0uOS0yLTItMkg4Yy0xLjEgMC0yIC45LTIgMnYxSDVjLTEuMSAwLTIgLjktMiAydjE0YzAgMS4xLjkgMiAyIDJoMTRjMS4xIDAgMi0uOSAyLTJWNWMwLTEuMS0uOS0yLTItMnpNOCA0aDh2NEg4VjR6bTExIDE1SDV2LTJoMTR2MnoiLz48L3N2Zz4=');
}

.leaflet-control-easyPrint .A4Landscape {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iIzMzMyI+PHBhdGggZD0iTTIxIDVINWMtMS4xIDAtMiAuOS0yIDJ2MTBjMCAxLjEuOSAyIDIgMmgxNmMxLjEgMCAyLS45IDItMlY3YzAtMS4xLS45LTItMi0yek01IDE5VjVoMTZ2MTRINXoiLz48L3N2Zz4=');
}

.leaflet-control-easyPrint a {
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
}

.leaflet-control-easyPrint a:before {
    content: '';
}

/* Layer control styling to match Leaflet zoom controls */
.leaflet-control-layers-custom {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    margin-top: 15px; /* Increased spacing from print buttons */
    position: relative;
    z-index: 1001; /* Ensure it's above other controls */
}

.leaflet-control-layers-custom a {
    background: #fff;
    color: #333;
    display: block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.leaflet-control-layers-custom a:hover {
    background: #f4f4f4;
    color: #000;
}

/* Layer panel styling */
.leaflet-control-layers-panel {
    position: absolute;
    top: 85px; /* Adjusted for increased spacing */
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    min-width: 220px;
    z-index: 1002; /* Higher z-index to stay above layer control */
    font-family: Arial, sans-serif;
    font-size: 16px;
}

.leaflet-control-layers-panel .layer-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.leaflet-control-layers-panel h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: bold;
}

.leaflet-control-layers-panel .layer-panel-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.leaflet-control-layers-panel .layer-panel-close:hover {
    background: rgba(0,0,0,0.1);
    color: #333;
}

.leaflet-control-layers-panel label {
    display: block;
    margin: 6px 0;
    cursor: pointer;
    padding: 6px 4px;
    color: #333;
    transition: background-color 0.2s;
    border-radius: 4px;
    font-size: 16px;
}

.leaflet-control-layers-panel label:hover {
    background: rgba(0,0,0,0.05);
}

.leaflet-control-layers-panel input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.leaflet-control-layers-panel .layer-emoji {
    font-size: 18px;
    margin-right: 8px;
}

/* Hide layer panel controls during print */
@media print {
    .leaflet-control-layers-custom,
    .leaflet-control-layers-panel {
        display: none !important;
    }
    
    .kodukohviku-pin-icon {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}