/* =========================================
   A11Y UI (MODAL I GUMB)
   ========================================= */

/* Plutajući gumb u donjem lijevom/desnom kutu */
.a11y-floating-btn {
    position: absolute;
    top: 9rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background-color: var(--clr-primary);
    color: var(--clr-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.eye-icon {
    max-width: 1em;
}

.a11y-floating-btn:hover {
    transform: scale(1.1);
    background-color: var(--clr-footer-bg);
}

/* Zatamnjena pozadina (Overlay) */
.a11y-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Skriveno po defaultu */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Klasa koja prikazuje modal */
.a11y-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sam prozor (Sadržaj) */
.a11y-modal-content {
    background-color: var(--clr-white);
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.a11y-modal-overlay.active .a11y-modal-content {
    transform: translateY(0);
}

.a11y-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

.a11y-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--clr-gray);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

/* Stilovi formi unutar modala */
.a11y-form-group {
    margin-bottom: 1rem;
}

.a11y-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--clr-text);
}

.a11y-form-group select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
}

/* Gumb za resetiranje */
.a11y-reset-btn {
    margin-top: 1.5rem;
    width: 100%;
    padding: 0.75rem;
    background-color: #ef4444; /* Crvena boja za reset */
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.a11y-reset-btn:hover {
    background-color: #dc2626;
}

/* =========================================
   PRILAGODBA ZA SLIJEPE I SLABOVIDNE (A11Y)
   ========================================= */

/* 1. VELIČINA FONTA (Agresivnije gaženje) */
html.a11y-font-md { font-size: 115% !important; }
html.a11y-font-lg { font-size: 130% !important; }

/* 2. VISOKI KONTRAST */
body.a11y-contrast-yellow-black {
    --clr-bg: #000000 !important;
    --clr-text: #FFFF00 !important;
    --clr-primary: #FFFF00 !important;
    --clr-secondary: #FFFF00 !important;
    --clr-jumbo-bg: #111111 !important;
    --clr-white: #000000 !important;
    --clr-gray: #CCCCCC !important;
    --clr-footer-bg: #000000 !important;
    --clr-footer-txt: #FFFF00 !important;
}

body.a11y-contrast-white-black {
    --clr-bg: #FFFFFF !important;
    --clr-text: #000000 !important;
    --clr-primary: #000000 !important;
    --clr-secondary: #000000 !important;
    --clr-jumbo-bg: #EEEEEE !important;
    --clr-white: #FFFFFF !important;
    --clr-gray: #333333 !important;
    --clr-footer-bg: #FFFFFF !important;
    --clr-footer-txt: #000000 !important;
}

/* 3. CRNO-BIJELE FOTOGRAFIJE I POZADINE */
body.a11y-grayscale img,
body.a11y-grayscale .jumbotron-home,
body.a11y-grayscale .thumbnail,
body.a11y-grayscale [style*="background-image"] {
    filter: grayscale(100%) !important;
}

/* 4. RAZMAK IZMEĐU SLOVA */
body.a11y-spacing-md * { letter-spacing: 0.12em !important; }
body.a11y-spacing-lg * { letter-spacing: 0.25em !important; }

/* 5. PRORED */
body.a11y-line-md * { line-height: 1.8 !important; }
body.a11y-line-lg * { line-height: 2.2 !important; }