﻿body {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* Set padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Override the default bootstrap behavior where horizontal description lists
   will truncate terms that are too long to fit in the left column
*/
.dl-horizontal dt {
    white-space: normal;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
    max-width: 100%;
}

#menuPrincipal {
    margin-bottom: 20px;
}

.navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus {
    background-color: cornflowerblue !important;
}

/*Arrumar layout para select2*/
.select2-container--default .select2-selection--single {
    border-radius: 1px;
    border: 1px solid #ccc;
}

.select2-container--default .select2-selection--multiple {
    border-radius: 1px;
    border: 1px solid #ccc;
}

.select2-container .select2-selection--single {
    height: 38px;
    background-image: url('images/arrowDown.png');
    padding-left: 7px;
    padding-right: 15px;
    background-repeat: no-repeat;
    background-position: right center;
    min-width: 100px;
    vertical-align: bottom;
}

.select2-container .select2-selection--multiple {
    height: 38px;
    background-image: url('images/arrowDown.png');
    padding-left: 15px;
    padding-right: 15px;
    background-repeat: no-repeat;
    background-position: right center;
    min-width: 100px;
    vertical-align: bottom;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 35px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: none;
}

.select2-container--default.select2-container--disabled .select2-selection--single {
    cursor: not-allowed;
}

.select2-container {
    vertical-align: bottom;
    float: left;
}

.number-style {
    padding: 3px 6px;
    font-size: 18px;
    font-weight: bold;
    color: darkblue;
    font-family: Tahoma;
}

#spanLoading {
    margin-right: 25px;
}

.tableEscala {
    font-size: 0.9rem;   
}

.tableEscala > thead > tr > th, .tableEscala > tbody > tr > th {
    text-align: center;
    padding: 2px 8px;
    border: 1px solid black !important;
    white-space: nowrap;
    width: auto;
    line-height: 1.2;
}

.container-fluid.body-container {
    padding-left: 50px;
    padding-right: 50px;
    max-width: 90%;
}

.celula-vazia {
    background-color: #e0e0e0 !important;
}

.table-responsive {
    display: flex;
    justify-content: center;
}

/* ===========================
   LISTAGEM DE PARTICIPANTES
   (_ParticipantesIndexTable)
   =========================== */

/* Cabeçalho: título + botão Adicionar */
.participantes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.participantes-header h3 {
    margin: 0;
}

/* Filtros (Ativos / Líderes / Comentaristas) */
.participantes-filtros {
    margin-bottom: 1.5rem;
}

.participantes-filtros p {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.filtros-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* Tabela de participantes */
.participantes-table thead {
    background-color: #495057;
    color: white;
}

.participantes-table thead a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.participantes-table thead a:hover {
    color: #f8f9fa;
    text-decoration: underline;
}

.participantes-table .edit {
    cursor: pointer;
}

.participantes-table .excluirItem {
    cursor: pointer;
    font-size: 1.1rem;
}

.participantes-table .excluirItem:hover {
    color: #dc3545 !important;
}

/* Colunas específicas (desktop) */
.participantes-table .col-nome {
    min-width: 150px;
    max-width: 200px;
    width: 15%;
}

.participantes-table .col-icon {
    width: 100px;
}

.participantes-table .col-missas {
    width: 360px;   /* mais espaço para Missas Disponíveis */
}

.participantes-table .col-dias {
    width: 220px;   /* um pouco menor que missas */
}

.participantes-table .col-escalacoes {
    width: 110px;
}

.participantes-table .col-acoes {
    width: 70px;
}

/* Badge de Escalações sem fundo azul */
.participantes-table .badge {
    background-color: transparent !important;
    color: #0d6efd;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0;
    border: none;
}

/* Info extra que aparece só no mobile, dentro da coluna Nome */
.participantes-table .info-mobile {
    display: none;
}

/* Nome em destaque */
.participantes-table .nome-principal {
    font-weight: 500;
}

/* ===========================
   FORMULÁRIOS (Leitores / Ministros)
   =========================== */

/* Lista de missas (checkboxes) */
.missas-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.missas-list li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Botões Salvar / Cancelar */
.form-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Linha com Pessoa / Tipo / Par / Líder (classe usada em Leitores e Ministros) */
@media (min-width: 768px) {
    .participante-form-row {
        display: flex;
        margin-bottom: 1rem;
    }

    .participante-form-row > div {
        flex: 1 1 0;
        margin-bottom: 0 !important;
        min-width: 0;
    }

    .participante-form-row .input-group {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
    }

    .participante-form-row .input-group-text {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .participante-form-row .form-control {
        flex: 1 1 auto;
        min-width: 0;
    }

    .participante-form-row .select2-container {
        width: 100% !important;
        float: none !important;
    }

    .participante-form-row .select2-container .select2-selection {
        width: 100% !important;
    }

    .participante-form-row .lider-col {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        padding-left: 0.5rem;
    }
}

@media (max-width: 767.98px) {
    .participantes-table {
        font-size: 0.85rem;
    }

    .participantes-table .badge {
        font-size: 0.9rem;
    }

    .participantes-table .info-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        margin-top: 0.5rem;
        font-size: 0.85rem;
        color: #6c757d;
    }

    .participantes-table .info-mobile span {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }

    .participantes-table .col-missas,
    .participantes-table .col-dias {
        display: none;
    }

    .participantes-header {
        flex-direction: column;
        align-items: stretch;
    }

    .participantes-header .btn {
        width: 100%;
        justify-content: center;
    }

    .input-group-text {
        font-size: 0.9rem;
        min-width: 90px;
    }

    .form-actions .btn {
        flex: 1;
        min-width: 120px;
    }

    .missas-list {
        flex-direction: column;
        gap: 0.5rem;
    }

    .leitores-page .participantes-table {
        font-size: 0.8rem;       
    }

    .leitores-page .participantes-table .nome-principal {
        font-size: 0.95rem;
    }

    .leitores-page .participantes-table th,
    .leitores-page .participantes-table td {
        padding-left: 0.4rem;
        padding-right: 0.4rem;     
    }
}

@media (max-width: 575.98px) {
    .input-group-text {
        font-size: 0.85rem;
        min-width: 80px;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* Mobile: botão + quebra para a linha de baixo */
@media (max-width: 576px) {
    .participante-form-row {
        flex-direction: column;
    }

    .participante-form-par-group {
        flex-wrap: wrap;
    }

    .participante-form-par-select {
        flex: 1 1 100%;
    }

    .participante-form-par-add-wrapper {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
        justify-content: flex-start;
    }

    .participante-form-par-add {
        width: 100%;
        text-align: center;
    }
}

/* Input de Pessoa somente leitura (edição de Leitores/Ministros) */
.pessoa-readonly-input {
    background-color: #f4f4f4 !important;
}

/* ===========================
   LISTAGENS GENÉRICAS (Cadastros/_Index)
   =========================== */

/* Cabeçalho: título + botão Adicionar */
.cadastros-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.cadastros-header h3 {
    margin: 0;
}

/* Tabela de cadastros */
.cadastros-table {
    width: 100%;
}

.cadastros-table thead {
    background-color: #495057;
    color: white;
}

.cadastros-table thead th {
    padding: 0.75rem;
    font-weight: 500;
}

.cadastros-table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
}

.cadastros-table .edit {
    cursor: pointer;
}

.cadastros-table .excluirItem {
    cursor: pointer;
}

.cadastros-table .excluirItem:hover {
    color: #dc3545 !important;
}

/* Info adicional (telefone, etc) - desktop */
.cadastros-table .col-info-adicional {
    width: 200px;
}

.cadastros-table .col-acoes {
    width: 100px;
    text-align: center;
}

/* Info que aparece só no mobile */
.info-mobile-cadastro {
    display: none;
}

.cadastros-table .nome-principal {
    font-weight: 500;
}

/* Responsividade para mobile */
@media (max-width: 767.98px) {
    .cadastros-header {
        flex-direction: column;
        align-items: stretch;
    }

    .cadastros-header .btn {
        width: 100%;
        justify-content: center;
    }

    .cadastros-table {
        font-size: 0.9rem;
    }

    .cadastros-table thead th,
    .cadastros-table tbody td {
        padding: 0.5rem;
    }

    /* Esconder coluna de info adicional no mobile */
    .cadastros-table .col-info-adicional {
        display: none;
    }

    /* Mostrar info adicional dentro da coluna nome */
    .info-mobile-cadastro {
        display: block;
        margin-top: 0.5rem;
        font-size: 0.85rem;
        color: #6c757d;
    }

    .cadastros-table .col-acoes {
        width: 80px;
    }

    .cadastros-table .col-acoes .fas {
        font-size: 16px !important;
        margin-right: 5px !important;
    }
}

@media (max-width: 575.98px) {
    .cadastros-table {
        font-size: 0.85rem;
    }

    .cadastros-table .nome-principal {
        font-size: 0.95rem;
    }

    .info-mobile-cadastro {
        font-size: 0.8rem;
    }
}
