/* =====================================================
   ETNOATLAS
   STYLE.CSS
===================================================== */


/* =====================================================
   GENERAL
===================================================== */

html,
body{

    width:100%;
    height:100%;

    margin:0;
    padding:0;

    font-family:Arial, Helvetica, sans-serif;

}

body{

    display:flex;
    flex-direction:column;

    overflow:hidden;

    background:#fff;

}


/* =====================================================
   HEADER
===================================================== */

#site-header{

    height:64px;

    flex-shrink:0;

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding:0 20px;

    background:#fff;

    border-bottom:1px solid #ddd;

    box-sizing:border-box;

}

#header-left{

    display:flex;

    align-items:center;

    gap:14px;

    flex:1;

    min-width:0;

}

#site-title{

    font-size:24px;

    font-weight:600;

    color:#333;

    line-height:1.1;

}

#site-subtitle{

    margin-top:2px;

    font-size:12px;

    color:#888;

    line-height:1.2;

}

#site-menu{

    display:flex;

    gap:24px;

}

#site-menu a{

    color:#555;

    text-decoration:none;

    font-size:14px;

}

#site-menu a:hover{

    color:#000;

}

#toggle-sidebar{

    display:none;

    width:38px;
    height:38px;

    border:none;
    background:none;
    cursor:pointer;

    border-radius:4px;

    font-size:22px;
    color:#555;

}

#toggle-sidebar:hover{

    background:#f2f2f2;

}

/* =====================================================
   LOGO + BRAND
===================================================== */

#site-brand {

    display: flex;
    align-items: center;
    gap: 12px;

    text-decoration: none;
    color: inherit;

}


#site-logo img {

    width: 45px;
    height: 45px;

    display: block;

}


#site-text {

    display: flex;
    flex-direction: column;

}


/* =====================================================
   LAYOUT
===================================================== */

#container{

    flex:1;

    display:flex;

    min-height:0;

}


/* =====================================================
   SIDEBAR
===================================================== */

#sidebar{

    width:320px;

    min-width:320px;

    overflow-y:auto;

    border-right:1px solid #ddd;

    background:#fafafa;

    padding:20px;

    box-sizing:border-box;

}

#sidebar.hidden{

    display:none;

}


/* =====================================================
   SEARCH
===================================================== */

#search{

    width:100%;

    margin-bottom:20px;

    padding:10px;

    box-sizing:border-box;

}


/* =====================================================
   TREE
===================================================== */

details{

    margin-bottom:4px;

}

summary{

    cursor:pointer;

    font-size:13px;

    font-weight:600;

    padding:2px 0;

}

ul{

    margin:2px 0;

    padding-left:18px;

    list-style:none;

}

li{

    margin:2px 0;

    cursor:pointer;

    font-size:12px;

}

li:hover{

    color:#1976d2;

}

.map-item.active{

    font-weight:bold;

    padding-left:6px;

    border-left:8px solid #FFD400;

    border-radius:4px;

    background:rgba(255,255,255,.35);

}


/* =====================================================
   MAP
===================================================== */

main{

    position:relative;

    flex:1;

    min-width:0;

}

#map{

    position:absolute;

    inset:0;

}

/* =====================================================
   LEGENDA
===================================================== */

#legend-panel{

    position:absolute;

    top:20px;

    right:20px;

    display:flex;

    align-items:flex-start;

    z-index:1000;

}

#map-info{

    width:220px;

    background:#fff;

    padding:10px;

    box-sizing:border-box;

    box-shadow:0 2px 8px rgba(0,0,0,.15);

}

#legend-toggle{

    width:28px;

    height:60px;

    margin-top:16px;

    margin-left:2px;

    display:none;

    align-items:center;

    justify-content:center;

    cursor:pointer;

    user-select:none;

    font-size:20px;

    color:#fff;

    background:rgba(80,80,80,.75);

    border-radius:0 4px 4px 0;

    transition:background .2s;

}

#legend-toggle:hover{

    background:rgba(60,60,60,.9);

}

#toggle-legend{

    display:none;

    width:38px;
    height:38px;

    border:none;
    background:none;

    cursor:pointer;

    border-radius:4px;

    font-size:22px;

    color:#555;

}

#toggle-legend:hover{

    background:#f2f2f2;

}


/* ---------- Titluri ---------- */

#map-title-main{

    text-align:center;

    font-size:20px;

    font-weight:600;

    color:#666;

    line-height:1.2;

}

#map-title-sub{

    margin-top:4px;

    margin-bottom:12px;

    text-align:center;

    font-size:14px;

    color:#888;

}


/* ---------- Număr atestări ---------- */

#map-counter{

    display:flex;

    justify-content:center;

    align-items:center;

    width:100%;

    margin:6px 0;

    padding:8px 0;

    box-sizing:border-box;

    font-size:13px;

}


/* ---------- Termeni ---------- */

#map-terms{

    min-height:0;

    font-size:13px;

    color:#444;

}


/* ---------- Separatoare ---------- */

#map-info hr{

    margin:10px 0;

    border:none;

    border-top:1px solid #ccc;

}


#map-dynamics label{

    display:flex;

    align-items:flex-start;

    gap:6px;

    margin:6px 0;

    cursor:pointer;

    font-size:13px;

}

#map-dynamics input[type="checkbox"]{

    flex:0 0 auto;

    margin-top:2px;

}

.legend-symbol{

    flex:0 0 14px;

    width:14px;

    min-width:14px;

    display:flex;

    justify-content:center;

    align-items:flex-start;

    margin-top:2px;

}

.legend-symbol svg{

    flex:none;

}

.legend-text{

    flex:1 1 auto;

    line-height:1.35;

    word-break:break-word;

}

#map-dynamics {

    max-height: 400px;

    overflow-y: auto;

}

.legend-color{

    width:8px;

    height:8px;

    display:inline-block;

}


/* ---------- Surse ---------- */

.legend-section-title{

    margin:10px 0 6px;

    font-size:13px;

    font-weight:bold;

}

.legend-source{

    display:flex;

    align-items:flex-start;

    gap:8px;

    margin:6px 0;

    font-size:13px;

    line-height:1.35;

    color:#4d4d4d;

}

.legend-source::before{

    content:"";

    width:6px;

    height:6px;

    margin-top:6px;

    border-radius:50%;

    background:#4d4d4d;

    flex-shrink:0;

}

.legend-source a{

    color:inherit;

    text-decoration:none;

}

.legend-source a:hover{

    text-decoration:underline;

}


/* ---------- Observații ---------- */

#map-observations{

    font-size:13px;

    color:#4d4d4d;

    line-height:1.4;

}

.legend-observation-text{

    font-size:13px;

    color:#4d4d4d;

    line-height:1.4;

}


/* ---------- Export ---------- */

#map-save{

    margin-top:18px;

}

.save-map-button{

    padding:7px 10px;

    border-radius:3px;

    background:rgba(90,90,90,.45);

    color:rgba(255,255,255,.9);

    text-align:center;

    cursor:pointer;

    font-size:12px;

    transition:background .2s;

}

.save-map-button:hover{

    background:rgba(90,90,90,.65);

}

/* =====================================================
   POPUP
===================================================== */

.popup-title{

    margin-bottom:10px;

    font-size:14px;

    font-weight:600;

}

.popup-term{

    margin-bottom:12px;

    font-size:13px;

    color:#555;

}

.popup-source-title{

    margin-top:8px;

    margin-bottom:6px;

    font-size:13px;

    font-weight:bold;

}

.popup-source{

    margin:5px 0;

    font-size:12px;

    color:#4d4d4d;

}

.popup-source a{

    color:inherit;

    text-decoration:none;

}

.popup-source a:hover{

    text-decoration:underline;

}


/* =====================================================
   CULORI DINAMICĂ
===================================================== */

:root {
    --dynamic-1: #1A1A1A;
    --dynamic-2: #efb522;
    --dynamic-3: #d7218b;
}


.color1 {
    background-color: var(--dynamic-1);
}

.color2 {
    background-color: var(--dynamic-2);
}

.color3 {
    background-color: var(--dynamic-3);
}

/* =====================================================
   BUTOANE
===================================================== */

button{

    font-family:inherit;

}

button:focus{

    outline:none;

}


/* =====================================================
   LINKURI
===================================================== */

a{

    color:inherit;

}


/* =====================================================
   SCROLLBAR
===================================================== */

#sidebar::-webkit-scrollbar{

    width:10px;

}

#sidebar::-webkit-scrollbar-thumb{

    background:#c8c8c8;

    border-radius:6px;

}

#sidebar::-webkit-scrollbar-track{

    background:#efefef;

}


/* =====================================================
   UTILITĂȚI
===================================================== */

.hidden{

    display:none !important;

}

/* =====================================================
   RESPONSIVE
===================================================== */


/* ---------- Tablete ---------- */

@media (max-width:1100px){

    #sidebar{

        width:280px;

        min-width:280px;

    }

    #legend-panel{

        top:12px;

        right:12px;

    }

}


/* ---------- Telefoane ---------- */

@media (max-width:768px){

    /* ==========================
       HEADER
       ========================== */

    #site-header{

        height:56px;

        padding:0 12px;

        position:relative;

        z-index:3000;

    }

    #header-left{

        flex:1;

        min-width:0;

    }

    #site-title{

        font-size:18px;

    }

    #site-subtitle{
        display:block;
        font-size:10px;
        white-space:nowrap;
    }

    #site-menu{

        display:none;

    }

    #toggle-legend{

        display:flex;

        align-items:center;

        justify-content:center;

        width:38px;

        height:38px;

        flex:0 0 auto;

    }

    #toggle-sidebar{
    display:flex;
    align-items:center;
    justify-content:center;
    }

    #legend-toggle{

        display:none !important;

    }


/* ---------- Telefoane mici ---------- */

@media (max-width:480px){

    #map-info{

        width:190px;

    }

    #map-title-main{

        font-size:17px;

    }

    #map-title-sub{

        font-size:12px;

    }

    #map-counter{

        font-size:12px;

    }

    .legend-source{

        font-size:12px;

    }

    .legend-observation-text{

        font-size:12px;

    }

}

    /* ==========================
       SIDEBAR
       ========================== */

    #sidebar{

        position:fixed;

        top:56px;

        left:0;

        bottom:0;

        width:280px;

        max-width:85vw;

        z-index:4000;

        background:#fff;

        box-shadow:2px 0 12px rgba(0,0,0,.25);

        transform:translateX(-100%);

        transition:transform .25s ease;

    }

    #sidebar.mobile-open{

        transform:translateX(0);

    }


    /* ==========================
       HARTĂ
       ========================== */

    main{

        position:relative;

    }

    #map{

        width:100%;

        height:calc(100vh - 56px);

    }


    /* ==========================
       LEGENDA
       ========================== */

    #legend-panel{

        position:fixed;

        top:56px;

        right:0;

        bottom:0;

        z-index:2500;

        pointer-events:none;

    }

    #map-info{

        width:280px;

        max-width:85vw;

        height:100%;

        max-height:none;

        overflow-y:auto;

        background:#fff;

        box-shadow:-2px 0 12px rgba(0,0,0,.25);

        transform:translateX(100%);

        transition:transform .25s ease;

        pointer-events:auto;

    }

    #map-info.mobile-open{

        transform:translateX(0);

    }

}


/* =====================================================
   SYMBOL LIBRARY
===================================================== */

.symbol-grid{

    display:grid;

    grid-template-columns:repeat(auto-fill,minmax(110px,1fr));

    gap:20px;

    padding:30px;

}

.symbol-card{

    border:1px solid #ddd;

    border-radius:8px;

    padding:15px;

    text-align:center;

    background:#fff;

}

.symbol-preview{

    width:42px;

    height:42px;

    margin:auto;

    display:flex;

    align-items:center;

    justify-content:center;

}

.symbol-id{

    margin-top:12px;

    font-weight:600;

    font-size:13px;

}

.symbol-name{

    margin-top:6px;

    font-size:12px;

    color:#666;

}

/* =====================================================
   Culori legendă
===================================================== */

.legend-color-box {

    display: inline-block;

    width: 12px;

    height: 12px;

    margin: 0 4px;

    vertical-align: middle;

}

/* =====================================================
   Simboluri în legenda termenilor
===================================================== */

#map-dynamics svg {

    vertical-align: middle;

    margin-right: 1px;

}

/* =====================================================
   Controale legenda termeni
===================================================== */

.legend-controls {

    display:flex;

    gap:6px;

    margin-bottom:8px;

}


.legend-controls button {

    background:#f5f5f5;

    border:1px solid #ccc;

    border-radius:3px;

    padding:3px 8px;

    font-size:11px;

    cursor:pointer;

    color:#333;

}


.legend-controls button:hover {

    background:#e8e8e8;

}

/* =====================================================
   THEME
===================================================== */

.theme{

    margin-bottom:18px;

}

.theme-title{

    margin:12px 0 8px;

    padding-bottom:4px;

    border-bottom:1px solid #d8d8d8;

    font-size:12px;

    font-weight:700;

    letter-spacing:.08em;

    text-transform:uppercase;

    color:#555;

}