/* Estilos para a funcionalidade de Riscos */

.risk-selection-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.risk-selection-container .form-group {
    flex: 1;
    margin-bottom: 0;
}

.risk-selection-container button {
    padding: 10px 15px;
    background-color: var(--marsala-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: none; /* Inicialmente escondido */
}

.risk-selection-container button:hover {
    background-color: var(--marsala-secondary);
}

.riscos-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.riscos-table th, .riscos-table td {
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: left;
    font-size: 0.9rem;
}

.riscos-table th {
    background-color: var(--marsala-primary);
    color: white;
    font-weight: 600;
}

.riscos-table tr:nth-child(even) {
    background-color: var(--marsala-lighter);
}

.riscos-table td select,
.riscos-table td input[type="text"] {
    width: 100%;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.riscos-table td button {
    margin-left: 5px;
    background-color: var(--danger);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 5px 8px;
}

.riscos-table td button:hover {
    background-color: #d32f2f;
}

/* Responsividade */
@media (max-width: 768px) {
    .risk-selection-container {
        flex-direction: column;
        gap: 10px;
    }

    .riscos-table, .riscos-table tbody, .riscos-table tr, .riscos-table td {
        display: block;
        width: 100%;
    }

    .riscos-table thead {
        display: none;
    }

    .riscos-table tr {
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        overflow: hidden;
    }

    .riscos-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    .riscos-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: calc(50% - 20px);
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: var(--marsala-primary);
    }

    .riscos-table td:nth-child(1)::before { content: "Risco"; }
    .riscos-table td:nth-child(2)::before { content: "Impacto"; }
    .riscos-table td:nth-child(3)::before { content: "Probabilidade"; }
    .riscos-table td:nth-child(4)::before { content: "Controle/POP"; }
}
