/**
 * Risco de Lesão - Estilos Customizados
 *
 * Estilos para a página de Índice de Risco de Lesão
 */

/* Container do gráfico */
.chart-container {
    position: relative;
    width: 100%;
    padding: 20px 0;
}

.chart-container canvas {
    max-width: 100%;
    height: auto !important;
}

/* Info boxes */
.info-box {
    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
    border-radius: .25rem;
    min-height: 80px;
    padding: .5rem;
    position: relative;
    display: flex;
    margin-bottom: 1rem;
}

.info-box .info-box-icon {
    border-radius: .25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.875rem;
    width: 70px;
}

.info-box .info-box-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.8;
    flex: 1;
    padding: 0 10px;
}

.info-box .info-box-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 600;
}

.info-box .info-box-number {
    display: block;
    font-weight: 700;
    font-size: 1.5rem;
}

/* Zonas de risco */
.info-box.bg-success {
    background-color: #28a745 !important;
    color: #fff;
}

.info-box.bg-warning {
    background-color: #ffc107 !important;
    color: #1f2d3d;
}

.info-box.bg-danger {
    background-color: #dc3545 !important;
    color: #fff;
}

.info-box.bg-info {
    background-color: #17a2b8 !important;
    color: #fff;
}

.info-box.bg-primary {
    background-color: #007bff !important;
    color: #fff;
}

.info-box.bg-light {
    background-color: #f8f9fa !important;
    color: #1f2d3d;
    border: 1px solid #dee2e6;
}

/* Alertas customizados */
.alert {
    border-radius: .25rem;
    padding: 1rem 1.25rem;
}

.alert h5 {
    margin-top: 0;
    margin-bottom: .5rem;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* Tabela de treinos sem PSE */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* Botões */
.btn-sm {
    padding: .25rem .5rem;
    font-size: .875rem;
    line-height: 1.5;
    border-radius: .2rem;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}

/* Labels das semanas */
.week-labels-container {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
    padding: 0 20px;
}

.week-label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
}

.week-label.current-week {
    color: #2196f3;
    font-weight: 700;
}

/* Card de zonas de risco */
.card-outline.card-info {
    border-top: 3px solid #17a2b8;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: .75rem 1.25rem;
}

.card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .chart-container {
        height: 350px !important;
    }

    .info-box {
        margin-bottom: .75rem;
    }

    .info-box .info-box-icon {
        width: 60px;
        font-size: 1.5rem;
    }

    .info-box .info-box-number {
        font-size: 1.25rem;
    }

    .info-box .info-box-text {
        font-size: 0.8rem;
    }

    .week-labels-container {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    .week-label {
        font-size: 11px;
    }

    .table-responsive {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .chart-container {
        height: 300px !important;
        padding: 10px 0;
    }

    .card-body {
        padding: 1rem;
    }

    .info-box {
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }

    .info-box .info-box-icon {
        width: 100%;
        margin-bottom: 10px;
        padding: 10px;
    }

    .info-box .info-box-content {
        padding: 0;
    }
}

/* Animações suaves */
.card,
.info-box,
.alert {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}

/* Breadcrumb customizado */
.breadcrumb {
    background-color: transparent;
    margin-bottom: 0;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    padding: 0 .5rem;
    color: #6c757d;
}

.breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Ajustes para impressão */
@media print {
    .chart-container {
        page-break-inside: avoid;
    }

    .info-box {
        page-break-inside: avoid;
    }

    .btn {
        display: none;
    }
}
