/* =========================================================
   ACCESIBILIDAD
   CUPOTECH SOLUTIONS
========================================================= */


/* =========================================================
   CONTENEDOR
========================================================= */

.commercial-accessibility {
    position: relative;

    flex-shrink: 0;

    font-family: "Inter", sans-serif;
}


/* =========================================================
   BOTÓN PRINCIPAL
========================================================= */

.commercial-accessibility-toggle {
    width: 46px;
    height: 46px;

    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    color: #31566f;

    background: #f5f9fc;

    border: 1px solid #cfe1eb;
    border-radius: 11px;

    cursor: pointer;

    font-family: "Inter", sans-serif;

    box-shadow:
            0 4px 12px rgba(12, 70, 105, 0.06);

    transition:
            color 0.2s ease,
            background 0.2s ease,
            border-color 0.2s ease,
            transform 0.2s ease,
            box-shadow 0.2s ease;
}


.commercial-accessibility-toggle:hover {
    color: #0878b9;

    background: #eaf7fc;

    border-color: #a9dbea;

    transform: translateY(-1px);

    box-shadow:
            0 7px 16px rgba(12, 70, 105, 0.10);
}


.commercial-accessibility-toggle i {
    font-size: 17px;
}


.commercial-accessibility-label {
    display: none;

    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   PANEL
========================================================= */

.accessibility-panel {
    width: 320px;

    position: absolute;

    top: calc(100% + 12px);
    right: 0;

    z-index: 1800;

    overflow: hidden;

    color: #173e5c;

    background: #ffffff;

    border: 1px solid #d6e6ef;
    border-radius: 16px;

    box-shadow:
            0 18px 45px rgba(8, 61, 96, 0.18);

    animation:
            accessibility-open
            0.18s ease;
}


.accessibility-panel[hidden] {
    display: none;
}


@keyframes accessibility-open {

    from {
        opacity: 0;

        transform:
                translateY(-5px)
                scale(0.98);
    }

    to {
        opacity: 1;

        transform:
                translateY(0)
                scale(1);
    }

}


/* =========================================================
   HEADER PANEL
========================================================= */

.accessibility-panel-header {
    padding: 16px 17px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    color: #ffffff;

    background:
            linear-gradient(
                    135deg,
                    #063a67,
                    #0878b9
            );
}


.accessibility-panel-title {
    display: flex;
    align-items: center;

    gap: 10px;
}


.accessibility-panel-title-icon {
    width: 36px;
    height: 36px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    color: #063a67;

    background: #ffffff;

    border-radius: 10px;
}


.accessibility-panel-title-icon i {
    font-size: 17px;
}


.accessibility-panel-title-text {
    display: flex;
    flex-direction: column;

    gap: 2px;
}


.accessibility-panel-title-text strong {
    font-size: 14px;
    font-weight: 800;
}


.accessibility-panel-title-text span {
    color: #d9f0fa;

    font-size: 9px;
    font-weight: 600;
}


.accessibility-close {
    width: 34px;
    height: 34px;

    padding: 0;

    display: grid;
    place-items: center;

    color: #ffffff;

    background: rgba(255, 255, 255, 0.10);

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9px;

    cursor: pointer;
}


.accessibility-close:hover {
    background: rgba(255, 255, 255, 0.18);
}


/* =========================================================
   CONTENIDO
========================================================= */

.accessibility-panel-body {
    padding: 16px;

    display: flex;
    flex-direction: column;

    gap: 12px;
}


/* =========================================================
   FILA DE CONFIGURACIÓN
========================================================= */

.accessibility-setting {
    padding: 13px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 14px;

    background: #f7fafc;

    border: 1px solid #e1edf3;
    border-radius: 12px;
}


.accessibility-setting-info {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 10px;
}


.accessibility-setting-icon {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    color: #0878b9;

    background: #e6f6fc;

    border-radius: 9px;
}


.accessibility-setting-icon i {
    font-size: 13px;
}


.accessibility-setting-text {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 2px;
}


.accessibility-setting-text strong {
    color: #234b66;

    font-size: 11px;
    font-weight: 800;
}


.accessibility-setting-text span {
    color: #7892a2;

    font-size: 8px;
    line-height: 1.35;
}


/* =========================================================
   TAMAÑO DE TEXTO
========================================================= */

.accessibility-text-controls {
    display: flex;
    align-items: center;

    gap: 5px;

    flex-shrink: 0;
}


.accessibility-text-button {
    width: 32px;
    height: 32px;

    padding: 0;

    display: grid;
    place-items: center;

    color: #31566f;

    background: #ffffff;

    border: 1px solid #cedfe8;
    border-radius: 8px;

    cursor: pointer;

    font-family: "Inter", sans-serif;

    font-size: 11px;
    font-weight: 800;

    transition:
            color 0.2s ease,
            background 0.2s ease,
            border-color 0.2s ease;
}


.accessibility-text-button:hover:not(:disabled) {
    color: #0878b9;

    background: #eaf7fc;

    border-color: #9fd5e8;
}


.accessibility-text-button:disabled {
    opacity: 0.4;

    cursor: not-allowed;
}


.accessibility-text-value {
    min-width: 37px;

    color: #567487;

    font-size: 9px;
    font-weight: 800;

    text-align: center;
}


/* =========================================================
   SWITCH
========================================================= */

.accessibility-switch {
    width: 42px;
    height: 23px;

    padding: 2px;

    position: relative;

    flex-shrink: 0;

    background: #c9d7de;

    border: 0;
    border-radius: 999px;

    cursor: pointer;

    transition:
            background 0.2s ease;
}


.accessibility-switch::after {
    content: "";

    width: 19px;
    height: 19px;

    position: absolute;

    top: 2px;
    left: 2px;

    background: #ffffff;

    border-radius: 50%;

    box-shadow:
            0 2px 5px rgba(0, 0, 0, 0.15);

    transition:
            transform 0.2s ease;
}


.accessibility-switch[aria-checked="true"] {
    background: #0878b9;
}


.accessibility-switch[aria-checked="true"]::after {
    transform:
            translateX(19px);
}


/* =========================================================
   RESTABLECER
========================================================= */

.accessibility-reset {
    width: 100%;
    height: 41px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    color: #46677c;

    background: #ffffff;

    border: 1px solid #d5e4ec;
    border-radius: 10px;

    cursor: pointer;

    font-family: "Inter", sans-serif;

    font-size: 10px;
    font-weight: 750;

    transition:
            color 0.2s ease,
            background 0.2s ease,
            border-color 0.2s ease;
}


.accessibility-reset:hover {
    color: #0878b9;

    background: #f0f9fc;

    border-color: #acd9e9;
}


/* =========================================================
   PIE DEL PANEL
========================================================= */

.accessibility-panel-footer {
    padding: 0 16px 15px;
}


.accessibility-panel-footer p {
    margin: 0;

    color: #8aa0ad;

    font-size: 8px;
    line-height: 1.45;

    text-align: center;
}


/* =========================================================
   FOCO VISIBLE
========================================================= */

html body
button:focus-visible,
html body
a:focus-visible,
html body
input:focus-visible,
html body
textarea:focus-visible,
html body
select:focus-visible {
    outline: 3px solid #0aa6d8;

    outline-offset: 3px;
}


/* =========================================================
   TAMAÑO DE TEXTO
========================================================= */

html[data-text-size="large"] {
    font-size: 112.5%;
}


html[data-text-size="xlarge"] {
    font-size: 125%;
}


/*
   Elementos comerciales que utilizan tamaños
   fijos en píxeles.
*/

html[data-text-size="large"]
.commercial-nav-link,
html[data-text-size="large"]
.commercial-dropdown-toggle,
html[data-text-size="large"]
.commercial-search input,
html[data-text-size="large"]
.commercial-user,
html[data-text-size="large"]
.cupora-message-bubble,
html[data-text-size="large"]
.cupora-input {
    font-size: 1.08em;
}


html[data-text-size="xlarge"]
.commercial-nav-link,
html[data-text-size="xlarge"]
.commercial-dropdown-toggle,
html[data-text-size="xlarge"]
.commercial-search input,
html[data-text-size="xlarge"]
.commercial-user,
html[data-text-size="xlarge"]
.cupora-message-bubble,
html[data-text-size="xlarge"]
.cupora-input {
    font-size: 1.16em;
}


/* =========================================================
   ALTO CONTRASTE
========================================================= */

html[data-high-contrast="true"] body {
    color: #ffffff;

    background: #000000;
}


html[data-high-contrast="true"]
.commercial-header {
    background: #000000;

    border-color: #ffffff;

    box-shadow:
            0 2px 0 #ffffff;
}


html[data-high-contrast="true"]
.commercial-brand,
html[data-high-contrast="true"]
.commercial-brand-text strong,
html[data-high-contrast="true"]
.commercial-nav-link,
html[data-high-contrast="true"]
.commercial-dropdown-toggle,
html[data-high-contrast="true"]
.commercial-user {
    color: #ffffff;
}


html[data-high-contrast="true"]
.commercial-nav-link:hover,
html[data-high-contrast="true"]
.commercial-dropdown-toggle:hover {
    color: #ffff00;
}


html[data-high-contrast="true"]
.commercial-search {
    color: #ffffff;

    background: #000000;

    border: 2px solid #ffffff;
}


html[data-high-contrast="true"]
.commercial-search input {
    color: #ffffff;
}


html[data-high-contrast="true"]
.commercial-search input::placeholder {
    color: #d7d7d7;
}


html[data-high-contrast="true"]
.commercial-theme-toggle,
html[data-high-contrast="true"]
.commercial-accessibility-toggle {
    color: #ffff00;

    background: #000000;

    border: 2px solid #ffffff;
}


html[data-high-contrast="true"]
.commercial-dropdown-menu,
html[data-high-contrast="true"]
.commercial-user-menu,
html[data-high-contrast="true"]
.commercial-search-results {
    color: #ffffff;

    background: #000000;

    border: 2px solid #ffffff;
}


html[data-high-contrast="true"]
.commercial-dropdown-menu a,
html[data-high-contrast="true"]
.commercial-user-menu a,
html[data-high-contrast="true"]
.commercial-search-results button {
    color: #ffffff;
}


html[data-high-contrast="true"]
.commercial-dropdown-menu a:hover,
html[data-high-contrast="true"]
.commercial-user-menu a:hover,
html[data-high-contrast="true"]
.commercial-search-results button:hover {
    color: #000000;

    background: #ffff00;
}


/* =========================================================
   CUPORA - ALTO CONTRASTE
========================================================= */

html[data-high-contrast="true"]
.cupora-panel,
html[data-high-contrast="true"]
.cupora-footer {
    color: #ffffff;

    background: #000000;

    border-color: #ffffff;
}


html[data-high-contrast="true"]
.cupora-conversation {
    background: #000000;
}


html[data-high-contrast="true"]
.cupora-message-bot
.cupora-message-bubble,
html[data-high-contrast="true"]
.cupora-quick-option,
html[data-high-contrast="true"]
.cupora-typing,
html[data-high-contrast="true"]
.cupora-input-wrapper {
    color: #ffffff;

    background: #000000;

    border: 2px solid #ffffff;
}


html[data-high-contrast="true"]
.cupora-input {
    color: #ffffff;
}


/* =========================================================
   PANEL ACCESIBILIDAD - MODO OSCURO
========================================================= */

html[data-theme="dark"]
.commercial-accessibility-toggle {
    color: #7ddcff;

    background: #102737;

    border-color: #29495a;
}


html[data-theme="dark"]
.commercial-accessibility-toggle:hover {
    color: #ffffff;

    background: #16394d;

    border-color: #376174;
}


html[data-theme="dark"]
.accessibility-panel {
    color: #d8e7ef;

    background: #0d2230;

    border-color: #29495a;

    box-shadow:
            0 18px 45px rgba(0, 0, 0, 0.35);
}


html[data-theme="dark"]
.accessibility-setting {
    background: #132c3b;

    border-color: #29495a;
}


html[data-theme="dark"]
.accessibility-setting-text strong {
    color: #dceaf1;
}


html[data-theme="dark"]
.accessibility-setting-text span {
    color: #8faaba;
}


html[data-theme="dark"]
.accessibility-setting-icon {
    color: #65d2f3;

    background: #17394a;
}


html[data-theme="dark"]
.accessibility-text-button {
    color: #c7dce6;

    background: #102737;

    border-color: #355566;
}


html[data-theme="dark"]
.accessibility-text-value {
    color: #a5bdca;
}


html[data-theme="dark"]
.accessibility-reset {
    color: #bfd4df;

    background: #102737;

    border-color: #29495a;
}


html[data-theme="dark"]
.accessibility-reset:hover {
    color: #ffffff;

    background: #16394d;
}


html[data-theme="dark"]
.accessibility-panel-footer p {
    color: #7f9bab;
}


/* =========================================================
   ALTO CONTRASTE SOBRE PANEL
========================================================= */

html[data-high-contrast="true"]
.accessibility-panel {
    color: #ffffff;

    background: #000000;

    border: 2px solid #ffffff;
}


html[data-high-contrast="true"]
.accessibility-setting {
    color: #ffffff;

    background: #000000;

    border: 1px solid #ffffff;
}


html[data-high-contrast="true"]
.accessibility-setting-text strong,
html[data-high-contrast="true"]
.accessibility-setting-text span {
    color: #ffffff;
}


html[data-high-contrast="true"]
.accessibility-setting-icon {
    color: #000000;

    background: #ffff00;
}


html[data-high-contrast="true"]
.accessibility-text-button,
html[data-high-contrast="true"]
.accessibility-reset {
    color: #ffffff;

    background: #000000;

    border: 2px solid #ffffff;
}


html[data-high-contrast="true"]
.accessibility-text-button:hover:not(:disabled),
html[data-high-contrast="true"]
.accessibility-reset:hover {
    color: #000000;

    background: #ffff00;
}


/* =========================================================
   REDUCIR MOVIMIENTO
========================================================= */

html[data-reduce-motion="true"] *,
html[data-reduce-motion="true"] *::before,
html[data-reduce-motion="true"] *::after {
    scroll-behavior: auto !important;

    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;

    transition-duration: 0.001ms !important;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 980px) {

    .commercial-accessibility {
        width: 100%;
    }


    .commercial-accessibility-toggle {
        width: 100%;
        height: 48px;

        padding: 0 14px;

        justify-content: flex-start;

        margin: 5px 0;
    }


    .commercial-accessibility-label {
        display: inline;
    }


    .accessibility-panel {
        width: min(
                320px,
                calc(100vw - 32px)
        );

        right: 0;
    }

}


@media (max-width: 540px) {

    .accessibility-panel {
        position: fixed;

        top: auto;
        right: 14px;
        bottom: 14px;
        left: 14px;

        width: auto;

        max-height: calc(100vh - 28px);

        overflow-y: auto;
    }

}