html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.scrollarea {
    overflow-y: auto;
}

.smallImgContainer {
    overflow: hidden;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex: none;
}

.smallImgContainer img {
    width: 48px;
}

.flatpickr-calendar .numInputWrapper {
    display: none;
}

.star {
    font-size: 22px;
    color: black;
    /* Cor inicial das estrelas */
    cursor: pointer;
}

.star:hover,
.star:hover~.star {
    color: gold;
    /* Cor ao passar o mouse */
}

.rating .star.selected {
    color: gold;
    /* Cor quando selecionada */
}

.rating {
    unicode-bidi: bidi-override;
    direction: rtl;
}

.hidden-presenca {
    display: none !important;
}

.visible-presenca {
    display: flex !important;
}

.school-info-bar {
    background-color: #797979;
    color: white;
    font-size: 1.15rem;
    padding: 8px 16px;
    font-weight: 500;
    width: 100%;
    display: flex;
    align-items: center;
}

/* iPad Style Background */
body {
    background-color: #ededed;
}

/* Ensure list items are white against the beige background */
.list-group-item {
    background-color: #ffffff !important;
    border-left: none;
    border-right: none;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
    background-color: #f8f9fa !important;
}

/* ===== Aula page tab redesign ===== */
#aulaTabs .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-weight: normal;
    border-color: transparent;
    background-color: transparent;
    border-radius: 8px 8px 0 0;
}

#aulaTabs .nav-link:hover:not(.active) {
    color: #555;
    border-color: transparent;
    background-color: transparent;
}

#aulaTabs .nav-link.active {
    color: #a71d2a !important;
    font-weight: bold;
    background-color: #fff;
    border-top: none;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #fff;
    /* merges into white container */
}

#aulaTabs .nav-link i {
    color: inherit !important;
}

/* Tablet / iPad Portrait */
@media (min-width: 768px) and (max-width: 1024px) {
    #aulaTabs .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 8px 4px;
        min-width: 80px;
        height: 65px;
        /* Consistent height to avoid jumping when text is hidden */
    }

    #aulaTabs .nav-link i {
        font-size: 1.7rem !important;
        /* Ícone bem ampliado */
        line-height: 1;
    }

    #aulaTabs .nav-link.active .tab-text {
        display: none;
        /* Sem texto na opção selecionada */
    }

    #aulaTabs .nav-link .tab-text {
        font-size: 0.85rem;
        text-align: center;
    }
}

/* Mobile */
@media (max-width: 767px) {
    #aulaTabs .tab-text {
        display: none;
        /* Apenas ícones no celular */
    }

    #aulaTabs .nav-link {
        justify-content: center;
        padding: 12px 10px;
    }

    #aulaTabs .nav-link i {
        font-size: 1.45rem !important;
    }
}

.aula-date-bar {
    background-color: #eed59794;
    border-radius: 6px;
    padding: 6px 16px;
    /* padding horizontal posiciona chevrons para dentro */
}

.aula-date-bar a {
    color: #888;
    /* chevrons em cinza */
    font-size: 1.4rem;
    -webkit-text-stroke: 0.8px #888;
}

.aula-date-bar a:hover {
    color: #555;
    -webkit-text-stroke-color: #555;
}

.aula-content-container {
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

/* ===== Button standardization inside aula content ===== */
.aula-content-container .btn:not(.btn-close):not(.btn-excluir-atividade) {
    min-height: 38px;
    background-color: #ededed;
    color: #333;
    border-color: #ccc;
    font-weight: 500;
    font-size: 1rem;
    /* neutraliza btn-sm */
    padding: 0.375rem 0.75rem;
    /* padding padrão Bootstrap btn */
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.aula-content-container .btn:not(.btn-close):not(.btn-excluir-atividade):hover {
    background-color: #ddd;
    color: #111;
    border-color: #bbb;
}

/* excluir/refazer: texto em vermelho mas fundo neutro */
.aula-content-container .btn-danger:not(.btn-close) {
    background-color: #ededed;
    color: #a71d2a;
    border-color: #ccc;
}

/* Marcar Todos / Copiar / Presenca Tab Styles */
.presenca-checkbox,
#lista-presencas input[type="checkbox"] {
    width: 28px !important;
    height: 28px !important;
    cursor: pointer;
    background-color: #fff;
    border: 1px solid #dee2e6 !important;
    appearance: none;
    /* Force consistency */
    -webkit-appearance: none;
}

/* Explicitly override Bootstrap's blue background when checked */
.presenca .form-check-input:checked,
#lista-presencas input[type="checkbox"]:checked {
    background-color: #198754 !important;
    border-color: #198754 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
}

/* Red text for Refazer button */
.btn-refazer {
    background-color: #ededed !important;
    color: #a71d2a !important;
    border-color: #ccc !important;
}

.btn-refazer:hover {
    background-color: #ddd !important;
    color: #8b1823 !important;
}

/* Button bar positioning for more list space */
.presenca .bg-white.position-sticky.bottom-0 {
    margin-bottom: -15px !important;
    padding-bottom: 5px !important;
    border-top: 1px solid #dee2e6;
}

@media (max-width: 767px) {
    .presenca .bg-white.position-sticky.bottom-0 {
        margin-bottom: -16px !important;
    }
}

/* Tablet refinement: remove "gray bar" on right margin */
@media (min-width: 768px) and (max-width: 1024px) {
    .aula-content-container {
        border-right: none !important;
    }

    .presenca .bg-white.position-sticky.bottom-0 {
        padding-bottom: 20px !important;
    }
}

/* Filter Button Group active styling */
#filtroPresencasGroup .btn.active {
    background-color: #f0f0f0;
    border-color: #ccc;
}

/* Anotacao green checkboxes (Privada, Pin, Alunos) */
.anotacao-check {
    width: 28px !important;
    height: 28px !important;
    cursor: pointer;
    background-color: #fff;
    border: 1px solid #dee2e6 !important;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 4px;
    flex-shrink: 0;
}

.anotacao-check:checked {
    background-color: #198754 !important;
    border-color: #198754 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}
/* Sticky columns for the Diário attendance table */
.sticky-col, .sticky-col-right {
    position: sticky;
    background-color: #fff !important;
}
/* Bootstrap 5 table-striped uses rgba which is transparent — override with solid color */
.table-striped > tbody > tr:nth-of-type(odd) > .sticky-col,
.table-striped > tbody > tr:nth-of-type(odd) > .sticky-col-right {
    background-color: rgba(0, 0, 0, 0.05) !important;
    background-color: #f2f2f2 !important;
}
.table > thead .sticky-col,
.table > thead .sticky-col-right {
    background-color: #fff !important;
}

/* Chrome Emulator Detachment Fix */
.form-select {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
