/*!
 * Start Bootstrap - Simple Sidebar (http://startbootstrap.com/)
 * Copyright 2013-2016 Start Bootstrap
 * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE)
 * Täiendatud ja optimeeritud loetavuse ning ligipääsetavuse tagamiseks.
 */

body {
    overflow-x: hidden;
}

/* Toggle Styles */

#wrapper {
    padding-left: 0;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

#wrapper.toggled {
    padding-left: 280px;
}

#sidebar-wrapper {
    z-index: 1000;
    position: fixed;
    left: 280px;
    width: 0;
    height: 100%;
    margin-left: -280px;
    overflow-y: auto;
    background: #2c3e50;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

/* LIGIPÄÄSETAVUS */
.skip-link {
    position: absolute;
    top: -100px;
    left: 10px;
    background: #002147;
    color: #ffffff !important;
    padding: 10px 15px;
    z-index: 1001;
    border-radius: 4px;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 10px;
    outline: 3px solid #3498db;
}

:focus-visible {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

#wrapper.toggled #sidebar-wrapper {
    width: 280px;
}

#page-content-wrapper {
    width: 100%;
    position: absolute;
    padding: 15px;
}

#wrapper.toggled #page-content-wrapper {
    position: absolute;
    margin-right: -280px;
}

/* Sidebar Styles */

.sidebar-nav {
    position: absolute;
    top: 0;
    width: 280px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-nav li {
    line-height: normal;
}

.sidebar-nav li a {
    display: block;
    text-decoration: none;
    color: #e2e8f0;
    padding: 11px 18px 11px 20px;
    font-size: 15px;
    line-height: 1.4;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.sidebar-nav li a:hover {
    text-decoration: none;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.sidebar-nav li.active a,
.sidebar-nav li a[aria-current="page"] {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
    border-left-color: #3498db;
}

.sidebar-nav li a:active,
.sidebar-nav li a:focus {
    text-decoration: none;
}

.sidebar-nav > .sidebar-brand {
    height: auto;
    font-size: 19px;
    font-weight: bold;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav > .sidebar-brand a {
    color: #ffffff;
    display: block;
    padding: 0;
    border-left: none;
}

.sidebar-nav > .sidebar-brand a:hover {
    color: #ffffff;
    background: none;
}

/* Väliste linkide ikoon (analoogne kodulehe pea-stiilile) */
.sidebar-nav a.external-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 20px;
}

.sidebar-nav a.external-link::after {
    content: '';
    display: inline-block;
    width: 0.85em;
    height: 0.85em;
    margin-left: 8px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    opacity: 0.8;
}

/* Mõistekaartide piltide ja konteineri täiendatud stiilid */
.concept-map-container {
    margin-top: 15px;
    margin-bottom: 20px;
}

.concept-map-img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.concept-map-img:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.concept-map-link {
    display: inline-block;
    margin-top: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
    color: #0056b3;
}

@media(min-width:768px) {
    #wrapper {
        padding-left: 0;
    }

    #wrapper.toggled {
        padding-left: 280px;
    }

    #sidebar-wrapper {
        width: 0;
    }

    #wrapper.toggled #sidebar-wrapper {
        width: 280px;
    }

    #page-content-wrapper {
        padding: 20px;
        position: relative;
    }

    #wrapper.toggled #page-content-wrapper {
        position: relative;
        margin-right: 0;
    }
}