/* Estilos Gerais para o Sisvet */

/* ======================================================= */
/* ESTILOS DE FORMULÁRIOS - INPUTS VISÍVEIS                */
/* ======================================================= */
.form-control {
    border: 1px solid #ced4da !important;
    border-radius: 8px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-control:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15) !important;
    outline: 0;
}
.form-control::placeholder {
    color: #adb5bd;
    opacity: 1;
}

.form-select {
    border: 1px solid #ced4da !important;
    border-radius: 8px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-select:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15) !important;
    outline: 0;
}

.form-check-input {
    border: 1px solid #ced4da !important;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd !important;
}
.form-check-input:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15) !important;
    outline: 0;
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.25rem;
}

.input-group-text {
    border: 1px solid #ced4da;
    background-color: #e9ecef;
    border-radius: 8px 0 0 8px;
}

/* ======================================================= */
/* ESTILOS DE CARDS                                        */
/* ======================================================= */
.card-custom {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header-success {
    background-color: #28a745 !important;
    color: white;
}

.card-header-warning {
    background-color: #ffc107 !important;
    color: #212529;
}

.list-group-item.evolucao-item {
    border-left: 3px solid var(--bs-primary);
    margin-bottom: 10px;
    border-radius: 0.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.list-group-item.vacina-item {
    border-left: 3px solid var(--bs-warning);
    margin-bottom: 10px;
    border-radius: 0.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.vacina-status {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.vacina-em-dia {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.vacina-atrasada {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.vacina-proxima {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}


/* ======================================================= */
/* ESTILOS DA AGENDA DIÁRIA (AGENDA.PHP) */
/* ======================================================= */

.agenda-wrapper { 
    width: 100%; 
    overflow-x: auto; 
    background-color: #fff; 
    border: 1px solid #dee2e6; 
    border-radius: .5rem; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
}
.agenda-grid { 
    display: flex; 
    /* A largura mínima será definida dinamicamente no PHP, mas se precisar de um fallback: */
    /* min-width: 1050px; */
}

.time-labels { 
    flex: 0 0 60px; 
    padding-top: 45px; 
    background: #f8f9fa; 
}
.time-slot { 
    height: 30px; 
    border-top: 1px dotted #e9ecef; 
    font-size: 0.75em; 
    text-align: right; 
    padding-right: 8px; 
    color: #6c757d; 
    position: relative; 
}
.time-slot:first-child { 
    border-top: none; 
}

.professional-col { 
    flex: 1; 
    border-left: 1px solid #dee2e6; 
    position: relative; 
    /* A largura mínima é definida dinamicamente no PHP. Se a largura for 350px no PHP, remova este min-width. 
       Caso contrário, use: min-width: 350px; */
}
.professional-header { 
    text-align: center; 
    padding: 12px 8px; 
    border-bottom: 2px solid #dee2e6; 
    font-weight: 600; 
    position: sticky; 
    top: 0; 
    background-color: #f8f9fa; 
    z-index: 10; 
    height: 45px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}


/* BLOCKS DE AGENDAMENTO */

.appointment-block { 
    position: absolute; 
    left: 8px; 
    right: 8px; 
    z-index: 5; 
    color: #212529; 
    border-radius: 6px; 
    
    /* Padding simples: 10px na esquerda para o ícone e 10px na direita. */
    padding: 6px 10px; 
    
    font-size: 0.85em; 
    /* REMOVIDO OVERFLOW: HIDDEN (evita que o bloco inteiro suma em caso de erro de cálculo) */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 
    transition: all 0.2s ease-in-out; 
    cursor: pointer; 
    text-decoration: none; 
}
.appointment-block:hover { 
    transform: scale(1.02); 
    z-index: 6; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); 
    text-decoration: none; 
    color: #212529; 
}

/* 🔑 AJUSTE CRÍTICO: FORÇAR O TEXTO A NÃO COLIDIR COM BOTÕES (SOLUÇÃO com margin-right) */
.appointment-block strong,
.appointment-block small { 
    display: block; 
    white-space: nowrap; 
    overflow: hidden; 
    
    /* Margem que reserva espaço para 2 botões de ação + badge de status (~95px) */
    margin-right: 95px; 
    width: auto; /* Permite que o texto utilize 100% do espaço restante */
    padding-right: 0 !important; 
    text-overflow: ellipsis; 
    font-weight: 600; 
    line-height: 1.2; 
}
.appointment-block small { font-weight: normal; color: #6c757d; } 


/* STATUS BADGES E AÇÕES */

.appointment-actions {
    position: absolute;
    top: 2px;
    right: 2px; /* Mantém os botões no canto */
    z-index: 10; 
    display: flex;
    gap: 2px;
    border-radius: 4px;
}
.status-badge { 
    position: absolute; 
    top: 4px; 
    right: 48px; /* Posiciona o badge, deixando espaço para as ações */
    font-size: 0.7em; 
    padding: 2px 4px; 
    border-radius: 3px; 
}

/* Estilos de status */
.status-agendado { background-color: #d1ecf1; color: #0c5460; }
.status-em-andamento { background-color: #fff3cd; color: #856404; }
.status-concluido { background-color: #d4edda; color: #155724; }
.status-cancelado { background-color: #f8d7da; color: #721c24; }


/* 🔑 ESTILOS DOS BOTÕES DE AÇÃO (EDITAR/EXCLUIR) 🔑 */
.appointment-actions .btn {
    display: inline-block;
    padding: 4px 6px; 
    line-height: 1;
    font-size: 0.75em; 
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    color: #fff !important; /* Força o ícone a ser branco */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.appointment-actions .btn-editar-agenda {
    background-color: #007bff !important; /* AZUL */
    border: 1px solid #007bff;
}
.appointment-actions .btn-editar-agenda:hover {
    background-color: #0056b3 !important;
    border-color: #0056b3;
}

.appointment-actions .btn-excluir-agenda {
    background-color: #dc3545 !important; /* VERMELHO */
    border: 1px solid #dc3545;
}
.appointment-actions .btn-excluir-agenda:hover {
    background-color: #c82333 !important;
    border-color: #bd2130;
}

/* ======================================================= */
/* PRESCRIÇÃO E ASSINANTURA DIGITAL */
/* ======================================================= */
.assinatura-digital-visual {
    border: 2px solid #2e7d32;
    padding: 10px;
    border-radius: 8px;
    background: #f1f8e9;
    color: #2e7d32;
    font-family: 'Courier New', Courier, monospace;
    font-size: 8pt;
    text-align: left;
    display: inline-block;
    position: relative;
    overflow: hidden;
}
.assinatura-digital-visual:before {
    content: "ASSINADO";
    position: absolute;
    top: 5px;
    right: -15px;
    transform: rotate(45deg);
    background: #2e7d32;
    color: white;
    font-size: 6pt;
    padding: 2px 20px;
}


/* ======================================================= */
/* GRAD "ADICAR" - 10+ Botoes Coloridos */
/* ======================================================= */
.btn-outline-purple {
    color: #6f42c1;
    border-color: #6f42c1;
}
.btn-outline-purple:hover {
    color: #fff;
    background-color: #6f42c1;
    border-color: #6f42c1;
}
.btn-outline-pink {
    color: #e83e8c;
    border-color: #e83e8c;
}
.btn-outline-pink:hover {
    color: #fff;
    background-color: #e83e8c;
    border-color: #e83e8c;
}
.btn-outline-success {
    color: #28a745;
    border-color: #28a745;
}
.btn-outline-success:hover {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}
.btn-outline-info {
    color: #17a2b8;
    border-color: #17a2b8;
}
.btn-outline-info:hover {
    color: #fff;
    background-color: #17a2b8;
    border-color: #17a2b8;
}
.btn-outline-warning {
    color: #ffc107;
    border-color: #ffc107;
}
.btn-outline-warning:hover {
    color: #212529;
    background-color: #ffc107;
    border-color: #ffc107;
}
.btn-outline-dark {
    color: #343a40;
    border-color: #343a40;
}
.btn-outline-dark:hover {
    color: #fff;
    background-color: #343a40;
    border-color: #343a40;
}
.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}
.btn-outline-danger:hover {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}
