/* ---------------------------------------------------------------------- */
/* Accessibility Sidebar Styles */
/* ---------------------------------------------------------------------- */

.accessibility-sidebar {
    position: fixed;
    right: 10px;
    top: 110px;
    width: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-radius: var(--borderRadius);
    background: var(--whiteColor);
    box-shadow: var(--boxShadow);
}

.accessibility-sidebar a,
.accessibility-sidebar button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primaryColor);
    color: var(--whiteColor);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.accessibility-sidebar a:hover,
.accessibility-sidebar button:hover {
    background: #002277;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.accessibility-sidebar button.active {
    background: #1a5c1a;
    box-shadow:
        0 0 10px rgba(26, 92, 26, 0.5),
        inset 0 0 5px rgba(0, 0, 0, 0.2);
}

.accessibility-sidebar button.active:hover {
    background: #228b22;
}

.accessibility-sidebar i {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* VLibras Container */
.vlibras-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 30%;
    max-width: 500px;
    height: auto;
    z-index: 999;
    background: var(--boxColor);
    border-radius: var(--borderRadius);
    box-shadow: var(--boxShadow);
    padding: 15px;
    margin: 15px;
}

.vlibras-container iframe,
.vlibras-container embed {
    width: 100% !important;
    height: auto !important;
    min-height: 300px;
}

/* Close button for VLibras */
.vlibras-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--redColor);
    color: var(--whiteColor);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000 !important;
}

.vlibras-close:hover {
    background: darkred;
}

/* Contraste CSS - High contrast theme */
body.contrast-mode {
    --primaryColor: #000;
    --bgColor: whitefff;
    --primaryColor: #000;
    --boxColor: #f0f0f0;
    --whiteColor: whitefff;
    --redColor: #ff0000;
    --grayColor: #e0e0e0;
    --gray2Color: #999;
    --gray3Color: #d0d0d0;
    --boxShadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .accessibility-sidebar {
        position: fixed;
        top: auto;
        bottom: -1px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 400px;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding: 10px;
        background: var(--whiteColor);
        border-top: 2px solid var(--grayColor);
        border-radius: 15px 15px 0 0;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
    }

    .accessibility-sidebar a,
    .accessibility-sidebar button {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .vlibras-container {
        width: 90%;
        max-width: 100%;
        height: auto;
        bottom: 20px;
        top: auto;
        right: 5%;
        left: auto;
    }
}

/* =========================
   CONTRASTE ACESSÍVEL REAL
========================= */

body.contrast-mode {
    background: #000 !important;
    color: white !important;
}

/* TEXTO */
body.contrast-mode,
body.contrast-mode p,
body.contrast-mode span,
body.contrast-mode li,
body.contrast-mode h1,
body.contrast-mode h2,
body.contrast-mode h3,
body.contrast-mode h4,
body.contrast-mode h5,
body.contrast-mode h6 {
    color: white !important;
}

/* LINKS */
body.contrast-mode a {
    color: white !important;
    text-decoration: underline !important;
}

/* FUNDOS GERAIS */
body.contrast-mode * {
    background-color: transparent !important;
    background-image: none !important;
}

/* CAIXAS / CARDS / MENUS */
body.contrast-mode .box,
body.contrast-mode .card,
body.contrast-mode .menu,
body.contrast-mode nav,
body.contrast-mode header,
body.contrast-mode footer,
body.contrast-mode section,
body.contrast-mode aside,
body.contrast-mode div {
    background-color: #000 !important;
    color: white !important;
}

/* BOTÕES */
body.contrast-mode button {
    background: #000 !important;
    color: white !important;
    border: 2px solid white !important;
}

/* INPUTS */
body.contrast-mode input,
body.contrast-mode textarea {
    background: #000 !important;
    color: white !important;
    border: 2px solid white !important;
}

/* IMAGENS (escurecer levemente) */
body.contrast-mode img {
    filter: brightness(0.8) contrast(1.2);
}

/* BORDAS */
body.contrast-mode * {
    border-color: white !important;
}

/* SIDEBAR */
body.contrast-mode .accessibility-sidebar a,
body.contrast-mode .accessibility-sidebar button {
    background: white !important;
    color: #000 !important;
    border: 2px solid #000 !important;
}

body.contrast-mode [vw] {
    display: none !important;
}

body.contrast-mode [vw-access-button] {
    position: fixed !important;
    left: -99999px !important;
    top: -99999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.water-analysis-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.water-analysis-modal {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 10px;
    padding: 30px;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}

.water-analysis-modal h3 {
    margin-bottom: 20px;
    font-size: 20px !important;
}
