/* * Lounari Dashboard CSS
 * Versio 6.1 - Hardened Styles
 * Tehty <3 Kalajoella
 */

/* --- LEAFLET FIXES (CRITICAL) --- */
.leaflet-pane img, .leaflet-tile-container img {
    max-width: none !important;
    max-height: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Parkki-ikonin tyyli */
.lounari-parking-icon {
    background-color: #0073aa;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-weight: bold;
    line-height: 24px !important;
    font-family: sans-serif;
    font-size: 14px;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    width: 24px !important;
    height: 24px !important;
    margin-left: -12px !important;
    margin-top: -12px !important;
}

/* --- MAP CONTAINERS --- */
.lounari-map-picker {
    height: 300px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
    z-index: 1;
}

/* Julkinen iso kartta */
#lounari-single-map-canvas {
    height: 450px !important;
    width: 100% !important;
    background: #eee;
    border-radius: 8px;
    border: 1px solid #ddd;
    z-index: 1;
    display: block;
    position: relative;
}

/* --- YLEISET --- */
.lounari-dashboard-container { background: #ffffff; border: 1px solid #e5e5e5; border-radius: 5px; padding: 30px; width: 100%; max-width: 1200px; margin: 20px auto; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; }
.lounari-header { border-bottom: 2px solid #f0f0f0; padding-bottom: 20px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.lounari-header h2 { margin: 0; color: #333; }
.badge { padding: 5px 10px; border-radius: 20px; font-size: 0.8em; font-weight: bold; text-transform: uppercase; white-space: nowrap; }
.badge.premium { background-color: #ffd700; color: #000; }
.badge.basic { background-color: #eee; color: #666; }
.lounari-btn { background: #0073aa; color: #fff; border: none; padding: 12px 25px; cursor: pointer; font-size: 16px; border-radius: 4px; transition: background 0.3s; }
.lounari-btn:hover { background: #005177; }
.lounari-form-group { margin-bottom: 20px; }
.lounari-form-group label { display: block; font-weight: 600; margin-bottom: 5px; }
.lounari-form-group input, .lounari-form-group textarea, .lounari-form-group select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }
.lounari-grid { display: flex; gap: 20px; flex-wrap: wrap; }
.lounari-col { flex: 1; min-width: 250px; }
.lounari-waste-section { background: #ffebee; padding: 15px; border: 1px solid #ffcdd2; margin-bottom: 20px; border-radius: 4px; border-left: 5px solid #d32f2f; }
.lounari-waste-section h3 { margin-top: 0; color: #b71c1c; }
.lounari-toggle { display: flex; align-items: center; cursor: pointer; }
.lounari-toggle input { display: none; }
.lounari-toggle-slider { width: 40px; height: 20px; background: #ccc; border-radius: 20px; position: relative; margin-right: 10px; transition: 0.3s; }
.lounari-toggle-slider:before { content: ""; position: absolute; width: 16px; height: 16px; background: white; border-radius: 50%; top: 2px; left: 2px; transition: 0.3s; }
.lounari-toggle input:checked + .lounari-toggle-slider { background: #d32f2f; }
.lounari-toggle input:checked + .lounari-toggle-slider:before { transform: translateX(20px); }
.lounari-toggle-label { font-weight: bold; }
#lounari-message { margin-left: 15px; font-weight: bold; color: #46b450; display: inline-block; margin-top: 10px; }

/* --- LINK STYLING --- */
.lounari-public-display a { text-decoration: none !important; font-weight: bold !important; border-bottom: 1px dotted; color: #0073aa; }
.lounari-public-display a:hover { color: #005177; border-bottom: 1px solid; }
.lounari-ext-btn { border-bottom: none !important; }

/* --- SINGLE RESTAURANT VIEW --- */
.lounari-public-display { font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; max-width: 1200px; margin: 0 auto; color: #333; width: 100%; box-sizing: border-box; display: block !important;}
.lounari-hero-section { display: flex !important; align-items: center; gap: 20px; background: #f8f9fa; padding: 20px; border-radius: 8px; margin-bottom: 30px; border-left: 5px solid #0073aa; flex-wrap: wrap; width: 100%; box-sizing: border-box; position: relative; }
.lounari-hero-score { font-size: 3em; font-weight: 800; color: #0073aa; line-height: 1; margin-right: 15px; }
.lounari-hero-meta { display: flex; flex-direction: column; justify-content: center; }
.lounari-hero-count { color: #666; font-size: 0.9em; text-transform: uppercase; letter-spacing: 1px; }
.lounari-status-badge { display: inline-block !important; padding: 5px 12px; border-radius: 4px; font-weight: bold; font-size: 0.9em; text-transform: uppercase; color: #fff; margin-top: 5px; }
.lounari-status-badge.open { background-color: #28a745; }
.lounari-status-badge.closed { background-color: #dc3545; }
.lounari-single-grid { display: flex !important; flex-wrap: wrap; gap: 30px; width: 100%; align-items: flex-start; flex-direction: row; }
.lounari-main-col { flex: 2 1 600px; background: #fff; min-width: 0; }
.lounari-sidebar-col { flex: 1 1 300px; background: #fdfdfd; padding: 20px; border-radius: 8px; border: 1px solid #e0e0e0; box-sizing: border-box; box-shadow: 0 4px 10px rgba(0,0,0,0.03); }
.lounari-content-block { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.lounari-content-block h3 { margin-top: 0; border-bottom: 2px solid #0073aa; display: inline-block; padding-bottom: 5px; margin-bottom: 15px; color: #333; font-size: 1.5em; clear: both; }
.lounari-text-content { line-height: 1.6; font-size: 1.05em; }
.lounari-sidebar-widget { margin-bottom: 30px; width: 100%; display: block; clear: both; }
.lounari-sidebar-widget h4 { margin-top: 0; color: #555; text-transform: uppercase; font-size: 0.95em; border-bottom: 2px solid #e0e0e0; padding-bottom: 8px; margin-bottom: 15px; font-weight: 700; letter-spacing: 0.5px; }
.lounari-hours-table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.lounari-hours-table td { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.lounari-day { font-weight: 600; color: #444; }
.lounari-time { text-align: right; color: #0073aa; }
.lounari-bar-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 0.9em; width: 100%; }
.lounari-bar-label { width: 40%; font-weight: 500; }
.lounari-bar-track { flex-grow: 1; height: 10px; background: #eee; border-radius: 5px; margin: 0 10px; overflow: hidden; }
.lounari-bar-fill { height: 100%; background: #0073aa; }
.lounari-bar-fill.green { background: #28a745; }
.lounari-bar-value { width: 25px; text-align: right; font-weight: bold; }
.lounari-features-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.lounari-badge { background: #e3f2fd; color: #0d47a1; padding: 6px 12px; border-radius: 15px; font-size: 0.85em; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #bbdefb; font-weight: 600; }
.lounari-badge.green { background: #e8f5e9; color: #1b5e20; border-color: #c8e6c9; }
.lounari-badge.orange { background: #fff3e0; color: #e65100; border-color: #ffe0b2; }
.lounari-ext-btn { display: block; text-align: center; padding: 12px; border-radius: 4px; font-weight: bold; text-decoration: none; color: #fff !important; transition: opacity 0.2s; margin-bottom: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.lounari-ext-btn:last-child { margin-bottom: 0; }
.lounari-ext-btn:hover { opacity: 0.9; }
.lounari-ext-btn.wolt { background: #009de0; }
.lounari-ext-btn.foodora { background: #d70f64; }
/* RESQ COLOR FIX - BACKUP CSS */
.lounari-ext-btn.resq { background-color: #1bcbac !important; color: #fff !important; }
.lounari-waste-banner { background: #ffebee; border: 2px solid #d32f2f; color: #b71c1c; padding: 20px; border-radius: 8px; margin-bottom: 30px; display: flex; align-items: center; gap: 20px; width: 100%; box-sizing: border-box; }
.waste-icon { font-size: 2.5em; }
.waste-details h4 { margin: 0 0 5px 0; font-size: 1.4em; text-transform: uppercase; }
.lounari-review-item { background: #f9f9f9; padding: 15px; border-radius: 6px; margin-bottom: 15px; border-left: 4px solid #ddd; }
.lounari-review-meta { font-size: 0.85em; color: #777; margin-bottom: 5px; }
.lounari-review-stars { color: #f39c12; font-weight: bold; margin-right: 5px; }
.lounari-owner-reply { margin-top: 10px; padding: 10px; background: #fff; border: 1px solid #eee; border-left: 3px solid #0073aa; font-size: 0.95em; }
@media (max-width: 800px) { .lounari-single-grid { flex-direction: column !important; } .lounari-main-col, .lounari-sidebar-col { width: 100% !important; min-width: 100% !important; flex: auto !important; } }
.lounari-grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; width: 100%; box-sizing: border-box; }
.lounari-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; position: relative !important; display: flex; flex-direction: column; z-index: 1; }
.lounari-card:hover { transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,0.1); }
.lounari-card.premium { border: 1px solid #ffd700; }
.lounari-card.waste-alert { border: 3px solid #d32f2f; box-shadow: 0 0 15px rgba(211,47,47,0.15); }
.card-image { height: 200px; background-size: cover; background-position: center; background-color: #eee; position: relative; }
.card-rating { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.8); color: #fff; padding: 4px 10px; border-radius: 4px; font-weight: bold; }
.waste-badge { position: absolute; top: 10px; right: 10px; background: #d32f2f; color: #fff; padding: 6px 12px; font-weight: bold; font-size: 0.85em; border-radius: 20px; z-index: 10; box-shadow: 0 2px 5px rgba(0,0,0,0.2); animation: pulseAlert 2s infinite; }
@keyframes pulseAlert { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
.card-image .open-badge, .card-image .closed-badge { position: absolute; top: 10px; left: 10px; padding: 4px 8px; border-radius: 4px; color: white; font-weight: bold; font-size: 0.8em; }
.open-badge { background-color: #28a745; } .closed-badge { background-color: #dc3545; }
.card-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.card-content h3 { margin: 0 0 10px 0; }
.card-btn { display: block; text-align: center; background: #f0f0f0; color: #333; padding: 12px; border-radius: 4px; font-weight: bold; text-decoration: none; margin-top: auto; }
.lounari-card.waste-alert .card-btn { background: #d32f2f; color: #fff; }
.lounari-top-list-container { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 20px; max-width: 100%; }
.lounari-top-intro { background: #f8f9fa; padding: 15px; border-left: 4px solid #0073aa; margin-bottom: 20px; }
.lounari-top-ol { padding-left: 20px; margin: 0; }
.lounari-top-ol li { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed #eee; font-size: 1.1em; }
.top-row { display: flex; justify-content: space-between; }
.top-score { color: #f39c12; font-weight: bold; }
