/* ============================================================
   TEMA MODERNO — AZUL SEE-AC
   Compatível com Bootstrap 4.6.2
   ============================================================ */

:root {
    --see-blue: #0479ff;
    /* Azul principal SEE-AC */
    --see-blue-light: #1a5db3;
    /* Hover / foco */
    --see-gray: #b8c2cc;
    --see-gray-light: #e9ecef;
}

/* --- Estrutura base sem conflitos --- */
.custom-control {
    position: relative;
    display: block;
    min-height: 1.6rem;
    padding-left: 2rem;
    cursor: pointer;
}

.custom-control-input {
    position: absolute;
    left: 0;
    width: 1.2rem;
    height: 1.2rem;
    opacity: 0;
    z-index: 2;
    cursor: pointer;
}

.custom-control-label {
    margin-bottom: 0;
    cursor: pointer;
    line-height: 1.3rem;

    padding-left: 1.8rem !important;
    position: relative;
    top: 1px;
    /* 1 a 2px é o padrão de equilíbrio */
}

/* ============================================================
   CHECKBOX — Tema SEE-AC
   ============================================================ */

.custom-checkbox .custom-control-label::before,
.custom-checkbox .custom-control-label::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 1.2rem;
    height: 1.2rem;
    content: "";
    border-radius: 0.25rem;
    transition: all 0.20s ease;
}

/* Caixa base */
.custom-checkbox .custom-control-label::before {
    border: 2px solid var(--see-gray);
    background: #fff;
}

/* Marcado */
.custom-checkbox .custom-control-input:checked~.custom-control-label::before {
    background: var(--see-blue);
    border-color: var(--see-blue);
}

/* Ícone de check */
.custom-checkbox .custom-control-input:checked~.custom-control-label::after {
    background-image: url("data:image/svg+xml,%3Csvg stroke='white' fill='none' stroke-width='3' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 12.75l6 4.5 9-13.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 85%;
}

/* Foco */
.custom-checkbox .custom-control-input:focus~.custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(0, 30, 255, 0.65);
}

/* Disabled */
.custom-checkbox .custom-control-input:disabled~.custom-control-label {
    color: #aaa;
}

.custom-checkbox .custom-control-input:disabled~.custom-control-label::before {
    background: var(--see-gray-light);
    border-color: #d0d0d0;
}

/* ============================================================
   RADIO — Tema SEE-AC
   ============================================================ */

.custom-radio .custom-control-label::before,
.custom-radio .custom-control-label::after {
    position: absolute;
    top: 0.22rem;
    left: 0;
    width: 1.15rem;
    height: 1.15rem;
    content: "";
    border-radius: 50%;
    transition: all 0.20s ease;
}

/* Círculo base */
.custom-radio .custom-control-label::before {
    border: 2px solid var(--see-gray);
    background: #fff;
}

/* Marcado */
.custom-radio .custom-control-input:checked~.custom-control-label::before {
    background: var(--see-blue);
    border-color: var(--see-blue);
}

.custom-radio .custom-control-input:checked~.custom-control-label::after {
    background: white;
    width: 0.55rem;
    height: 0.55rem;
    top: 0.47rem;
    left: 0.32rem;
}

/* Foco */
.custom-radio .custom-control-input:focus~.custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(0, 30, 255, 0.65);
}

/* ============================================================
   SWITCH — Tema SEE-AC (estilo iOS)
   ============================================================ */

.custom-switch {
    padding-left: 2.7rem;
}

.custom-switch .custom-control-label::before {
    position: absolute;
    top: 0.25rem;
    left: 0;
    width: 2.2rem;
    height: 1.1rem;
    border-radius: 1rem;
    background: var(--see-gray-light);
    content: "";
    transition: background 0.25s ease;
}

.custom-switch .custom-control-label::after {
    position: absolute;
    top: 0.25rem;
    left: 0.05rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    content: "";
    transition: transform 0.25s ease;
}

/* Ativo */
.custom-switch .custom-control-input:checked~.custom-control-label::before {
    background: var(--see-blue);
}

.custom-switch .custom-control-input:checked~.custom-control-label::after {
    transform: translateX(1.05rem);
}

/* Foco */
.custom-switch .custom-control-input:focus~.custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(0, 30, 255, 0.65);
}

/* Disabled */
.custom-switch .custom-control-input:disabled~.custom-control-label {
    color: #aaa;
}

.custom-switch .custom-control-input:disabled~.custom-control-label::before {
    opacity: 0.5;
}

/* CORREÇÃO: deslocar o texto da label para a direita */
.custom-control-label {
    padding-left: 1.8rem !important;
    /* ajuste fino */
}

/* Garantir alinhamento perfeito da caixa */
.custom-checkbox .custom-control-label::before,
.custom-checkbox .custom-control-label::after {
    left: 0.2rem !important;
}
