﻿/* Καθαρισμός και νέα δομή Flexbox */

/* Γενικές ρυθμίσεις για να πιάνει η σελίδα όλο το ύψος */
html, body {
    height: 100%;
    margin: 0;
    overflow: hidden; /* Αποφυγή scrollbar στο body, scroll μόνο στα sidebars */
}
.site-header {
    background-image: url('/img/logo-256.png');
    background-size: contain;
    background-repeat: no-repeat;
}
.site-logo {
    height: 40px;
    width: auto;
    display: inline-block;
}

/* Το main container του Layout της σελίδας */
main[role="main"] {
    height: 100%; /* Αφαιρούμε ύψος header/footer του _Layout.cshtml αν υπάρχουν */
    display: flex;
    flex-direction: column;
}


/* site.css */

/* Κάνουμε το container του header να πιάνει όλο το πλάτος για να χωράνε τα φίλτρα */
nav.container-fluid {
    padding-left: 20px;
    padding-right: 20px;
}

/* Ο χάρτης τώρα πρέπει να υπολογίζει μόνο το ύψος του Header και του Status Bar */
/* Το main πρέπει να έχει σταθερό ύψος (viewport height μείον το header/footer) */
.map-layout-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}
/* Το container που περιέχει την αριστερή μπάρα, τον χάρτη και τη δεξιά μπάρα */
.map-content-row {
    display: flex;
    position: relative;
    width: 100%;
    flex: 1;
    overflow: hidden; /* ΣΗΜΑΝΤΙΚΟ */
}


/* Αριστερή Μπάρα Λεπτομερειών */

/* Sidebar default */
.info-sidebar {
   
        width: 300px;
        min-width: 300px;
        transition: width 0.25s ease;
        overflow-y: auto;
      -webkit-overflow-scrolling: touch; /* για smooth scroll σε mobile */
}



#info-content {
    flex: 1 1 auto; /* ΠΙΑΝΕΙ ΟΛΟ ΤΟ ΥΨΟΣ */
    min-height: 0; /* ΚΡΙΣΙΜΟ για flexbox scroll */
    overflow-y: auto;
}
/* 2. Μεσαίο τμήμα: Χάρτης + Διαφημίσεις */
/* Ο Χάρτης */
#map {
    flex: 1;
    min-width: 0; /* ΠΟΛΥ ΣΗΜΑΝΤΙΚΟ για flex */
    /* Προσθήκη χρώματος φόντου (Ωκεανός) */
    background-color: #aad3df;
}

/* Η Δεξιά Μπάρα (Διαφημίσεις) */
.ads-sidebar {
    flex: 0 0 300px; /* Σταθερό πλάτος 300px */
    background: #fff;
    border-left: 1px solid #ccc;
    padding: 15px;
    overflow-y: auto;
    z-index: 2;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
}

/* 3. Status Bar */
#map-status-bar {
    flex: 0 0 30px;
    background: #333;
    color: #fff;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 1003;
}

#status-text {
    white-space: nowrap;
}

#powered-by {
    text-align: right;
    font-size: 0.8rem;
    color: #ccc;
    white-space: nowrap;
}

    #powered-by a {
        color: #fff;
        text-decoration: none;
    }

        #powered-by a:hover {
            text-decoration: underline;
        }


/* Popup Styles (από τον αρχικό σου κώδικα) */
.popup-card {
    min-width: 200px;
    font-size: 0.9rem;
}

.popup-title {
    font-weight: bold;
    color: #004085;
    margin-bottom: 5px;
}

.popup-link {
    display: block;
    margin-top: 5px;
    color: white;
    background-color: #28a745;
    padding: 3px 8px;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
}

    .popup-link:hover {
        background-color: #218838;
        color: white;
    }
/* site.css */



.tournament-card {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

    .tournament-card:hover {
        background-color: #f8fbff;
        border-left: 4px solid #007bff;
    }

.tournament-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #007bff;
    text-decoration: none;
    display: block; /* Απαραίτητο για να λειτουργήσει το wrap */
    overflow-wrap: break-word; /* Σπάει τις λέξεις */
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.4;
}
    .tournament-title:hover {
        color: #0056b3;
        text-decoration: underline;
    }
.location-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
}


/* Custom Scrollbar για την μπάρα */
#info-content::-webkit-scrollbar {
    width: 6px;
}

#info-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
.chess-marker svg {
    width: 24px;
    height: 24px;
}
.filter-menu {
    display: none;
    background: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

    .filter-menu label {
        font-size: 13px;
        font-weight: 600;
        margin-top: 10px;
        display: block;
    }

/* Το κουμπί */
.sidebar-toggle-btn {
    position: absolute;
    top: 70px;
    left: 300px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #444;
    color: white;
    cursor: pointer;
    z-index: 5000; /* 🔥 ΠΟΛΥ ΣΗΜΑΝΤΙΚΟ */
}


    .sidebar-toggle-btn:hover {
        background: #333;
    }
/* Όταν η sidebar κλείνει → το κουμπί πάει στο 0 */

.map-content-row.sidebar-closed .sidebar-toggle-btn {
    left: 0;
}
.map-content-row.sidebar-closed .info-sidebar {
    width: 0;
    min-width: 0;
}

.map-filter-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
    background: white;
    border-radius: 50%;
    padding: 10px 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    cursor: pointer;
}

    .map-filter-btn i {
        font-size: 18px;
    }

/* Filter control background transparent */
.leaflet-control-filter a {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.leaflet-control-filter i {
    color: #dc3545; /* bootstrap danger red */
}
.leaflet-control-filter a:hover i {
    color: #0d6efd; /* bootstrap primary */
}
.filter-active i {
    color: #198754; /* bootstrap success */
}
.leaflet-control-filter a:hover {
    background: rgba(255,255,255,0.85);
    border-radius: 4px;
}
.leaflet-control-info a {
    background: transparent !important;
    border: none;
}

.leaflet-control-info i {
    color: #0d6efd; /* info blue */
}

.leaflet-control-info a:hover i {
    color: #0a58ca;
}