/* ========================================
   Estilos para Detalle de Obra Social
   ======================================== */

/* Contenedor principal */
.page-row {
    min-height: 100vh;
}

/* Breadcrumb mejorado */
.breadcrumb {
    background-color: transparent;
    padding: 15px 0;
    margin-bottom: 0;
    font-size: 14px;
}

.breadcrumb li a {
    color: #0072BB;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb li a:hover {
    color: #242C4F;
    text-decoration: underline;
}

.breadcrumb > .active {
    color: #6c757d;
}

/* Botón de regreso */
.back-button-container {
    margin: 20px auto;
    max-width: 1200px;
}

.back-button-container.bottom {
    margin-top: 30px;
    margin-bottom: 30px;
}

.btn-back {
    background-color: #f2f2f2;
    color: #242C4F;
    border: 1px solid #d0d0d0;
    padding: 10px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.btn-back:hover,
.btn-back:focus {
    background-color: #e9ecef;
    color: #1a1f38;
    text-decoration: none;
}

.btn-back .arrow {
    margin-right: 6px;
    font-weight: 700;
}

/*.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #242C4F;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-back:hover {
    background-color: #1a1f38;
    color: white;
    text-decoration: none;
    transform: translateX(-4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-back:active {
    transform: translateX(-2px);
}

.btn-back .arrow {
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.btn-back:hover .arrow {
    transform: translateX(-3px);
}

.btn-back:focus {
    outline: 2px solid #242C4F;
    outline-offset: 2px;
}*/

/* Fecha de actualización */
.fecha-actualizacion {
    margin: 20px auto;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
    text-align: center;
    max-width: 800px;
}

/* Mensajes de resultado */
.result {
    margin: 30px auto;
    padding: 25px;
    border-radius: 6px;
    animation: slideIn 0.3s ease-out;
    border-left: 5px solid;
    max-width: 800px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result.error {
    background: #fff8e1;
    border-left-color: #F9B233;
}

.result-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.result.error .result-title {
    color: #f57c00;
}

.result-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.1);
    color: #666;
}

/* Panel personalizado */
.panel-custom {
    border-radius: 6px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    border: none;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.panel-heading-custom {
    background-color: #fff;
    border-bottom: none;
    padding-bottom: 0;
}

.panel-body {
    padding: 40px;
}

/* Título del panel */
.panel-title {
    font-size: 24px;
    font-weight: 600;
    color: #242C4F;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
    border-left: 4px solid #0072BB;
    padding-left: 15px;
}

/* Título de secciones */
.results-title {
    font-size: 20px;
    font-weight: 600;
    color: #242C4F;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.detail-info {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    font-style: italic;
}

/* Tabla de detalles (clave-valor) */
.cons-table {
    width: 100%;
    margin-bottom: 0;
    background-color: transparent;
    border-collapse: collapse;
}

.cons-table th {
    background-color: #eef0f6;
    color: #3d4466;
    padding: 12px 20px;
    font-weight: 600;
    text-align: left;
    font-size: 14px;
    width: 35%;
    vertical-align: middle;
    border-bottom: 1px solid #dde0ea;
}

.cons-table td {
    padding: 12px 20px;
    vertical-align: middle;
    font-size: 14px;
    color: #333;
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
}

/* Filas impares con fondo suave */
.cons-table tr:nth-child(odd) th,
.cons-table tr:nth-child(odd) td {
    background-color: #f5f6fa;
}

/* Filas pares */
.cons-table tr:nth-child(even) th,
.cons-table tr:nth-child(even) td {
    background-color: #ffffff;
}

.cons-table tr:last-child th,
.cons-table tr:last-child td {
    border-bottom: none;
}

/* Efecto hover en las filas */
.cons-table tr {
    transition: background-color 0.2s ease;
}

.cons-table tr:hover th,
.cons-table tr:hover td {
    background-color: #e4e7f0;
}

/* Estilo para ACRONYM */
.cons-table th ACRONYM {
    cursor: help;
    border-bottom: 1px dotted rgba(61, 68, 102, 0.5);
    text-decoration: none;
}

/* Enlaces dentro de la tabla */
.cons-table td a {
    color: #0072BB;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cons-table td a:hover {
    color: #242C4F;
    text-decoration: underline;
}

/* Textarea dentro de la tabla */
.cons-table td textarea {
    width: 100%;
    min-height: 120px;
    max-height: 300px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    resize: vertical;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

/* Estilo específico para el textarea de ámbito personal */
.cons-table td textarea.ambito-personal-textarea {
    min-height: 150px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Responsive: En pantallas pequeñas */
@media (max-width: 768px) {
    .cons-table td textarea {
        font-size: 13px;
        padding: 10px;
    }
    
    .cons-table td textarea.ambito-personal-textarea {
        min-height: 120px;
    }
}

.cons-table td textarea:focus {
    outline: none;
    border-color: #242C4F;
    background-color: #ffffff;
}

/* Tabla de delegaciones (formato listado) */
.cons-table.table-striped thead tr th {
    background: linear-gradient(135deg, #242C4F 0%, #1a1f38 100%);
    color: white;
    padding: 18px 20px;
    font-weight: 600;
    text-align: left;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    width: auto;
}

/* Filas de tabla de delegaciones */
.cons-table.table-striped tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.cons-table.table-striped tbody tr:last-child {
    border-bottom: none;
}

.cons-table.table-striped tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.005);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cons-table.table-striped tbody tr td {
    padding: 16px 20px;
    font-size: 14px;
}

/* Estilos para filas alternadas en tabla de delegaciones */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #ffffff;
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: #f8f9fa;
}

/* Mejora del contenedor */
.container {
    max-width: 1200px;
}

/* Sección de delegaciones */
.delegaciones-section {
    margin: 30px auto;
    max-width: 1200px;
    text-align: center;
}

.delegaciones-section .btn-validate {
    max-width: 400px;
    margin: 0 auto;
    background: linear-gradient(135deg, #0072BB 0%, #005a94 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 114, 187, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.delegaciones-section .btn-validate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 114, 187, 0.35);
    background: linear-gradient(135deg, #005a94 0%, #004875 100%);
}

.delegaciones-section .btn-validate:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 114, 187, 0.3);
}

.delegaciones-section .btn-validate:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.delegaciones-section .btn-validate .btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.delegaciones-section .btn-validate .btn-text::before {
    content: "📋";
    font-size: 18px;
}

.delegaciones-section .spinner-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#delegacionesContainer {
    margin-top: 30px;
    animation: fadeIn 0.5s ease-out;
}

#delegacionesError {
    max-width: 800px;
    margin: 20px auto;
}

.no-delegaciones {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 16px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin: 20px 0;
}

.no-delegaciones p {
    margin: 0;
}

/* Responsive */
@media (max-width: 992px) {
    .cons-table th {
        width: 40%;
        font-size: 14px;
        padding: 15px 18px;
    }

    .cons-table td {
        font-size: 14px;
        padding: 15px 18px;
    }

    .panel-body {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .panel-title {
        font-size: 20px;
    }

    .panel-body {
        padding: 25px 20px;
    }

    /*.btn-back {
        font-size: 14px;
        padding: 10px 20px;
    }

    .btn-back .arrow {
        font-size: 16px;
    }*/

    .cons-table th {
        width: 45%;
        font-size: 13px;
        padding: 12px 15px;
    }

    .cons-table td {
        font-size: 13px;
        padding: 12px 15px;
    }

    .cons-table td textarea {
        font-size: 13px;
        padding: 10px;
    }

    .detail-info {
        font-size: 13px;
    }

    .cons-table.table-striped thead tr th {
        font-size: 13px;
        padding: 12px 10px;
    }

    .cons-table.table-striped tbody tr td {
        padding: 12px 10px;
        font-size: 13px;
    }

    .results-title {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    /* Convertir tabla de detalles a diseño apilado en móviles */
    .cons-table {
        font-size: 13px;
    }

    .cons-table th,
    .cons-table td {
        display: block;
        width: 100%;
        text-align: left;
    }

    .cons-table th {
        border-radius: 4px 4px 0 0;
        padding: 10px 15px;
    }

    .cons-table td {
        border-radius: 0 0 4px 4px;
        padding: 10px 15px;
        margin-bottom: 15px;
    }

    .cons-table tr {
        display: block;
        margin-bottom: 20px;
        border-radius: 4px;
        overflow: hidden;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .breadcrumb {
        font-size: 12px;
    }

    .detail-info {
        font-size: 12px;
    }

    /*.btn-back {
        width: 100%;
        justify-content: center;
        font-size: 13px;
        padding: 10px 16px;
    }*/

    .panel-body {
        padding: 20px 15px;
    }

    /* Tabla de delegaciones en móvil */
    .cons-table.table-striped thead {
        display: none;
    }

    .cons-table.table-striped tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
        border-radius: 6px;
        overflow: hidden;
    }

    .cons-table.table-striped tbody tr td {
        display: block;
        text-align: right;
        padding: 10px 15px;
        border-bottom: 1px solid #e9ecef;
        position: relative;
    }

    .cons-table.table-striped tbody tr td:last-child {
        border-bottom: none;
    }

    .cons-table.table-striped tbody tr td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: #242C4F;
    }

    .result {
        padding: 20px;
    }

    .result-title {
        font-size: 18px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel.panel-default {
    animation: fadeIn 0.5s ease-out;
}

/* Sombra adicional al hacer scroll */
.panel.panel-default:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease;
}

/* Panel de resultados */
.panel.panel-default {
    border: none;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 30px;
    margin-bottom: 30px;
    background-color: #ffffff;
}

/* Tabla de detalles (formato clave-valor) */
.cons-table {
    width: 100%;
    margin-bottom: 0;
    background-color: transparent;
}

/*.cons-table th {
    background: linear-gradient(135deg, #2E3191 0%, #0072BB 100%);
    color: white;
    padding: 18px 25px;
    font-weight: 600;
    text-align: left;
    font-size: 15px;
    width: 35%;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}*/

.cons-table td {
    padding: 18px 25px;
    vertical-align: middle;
    font-size: 15px;
    color: #333;
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
}

.cons-table tr:last-child th,
.cons-table tr:last-child td {
    border-bottom: none;
}

/* Efecto hover en las filas */
.cons-table tbody tr {
    transition: all 0.3s ease;
}

.cons-table tbody tr:hover {
    background-color: #f8f9fa;
}

.cons-table tbody tr:hover td {
    background-color: #f8f9fa;
}

/* Estilo para ACRONYM */
.cons-table th ACRONYM {
    cursor: help;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

/* Enlaces dentro de la tabla */
.cons-table td a {
    color: #0072BB;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cons-table td a:hover {
    color: #2E3191;
    text-decoration: underline;
}

/* Textarea dentro de la tabla */
.cons-table td textarea {
    width: 100%;
    max-width: 500px;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f8f9fa;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.cons-table td textarea:focus {
    outline: none;
    border-color: #0072BB;
    background-color: #ffffff;
}

/* Tabla de delegaciones (formato listado) */
.cons-table.table-striped thead tr th {
    background: linear-gradient(135deg, #2E3191 0%, #0072BB 100%);
    color: white;
    padding: 18px 20px;
    font-weight: 600;
    text-align: left;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    width: auto;
}

/* Filas de tabla de delegaciones */
.cons-table.table-striped tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.cons-table.table-striped tbody tr:last-child {
    border-bottom: none;
}

.cons-table.table-striped tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.005);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cons-table.table-striped tbody tr td {
    padding: 16px 20px;
    font-size: 14px;
}

/* Estilos para filas alternadas en tabla de delegaciones */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #ffffff;
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: #f8f9fa;
}

/* Badges para valores SI/NO */
.cons-table td {
    font-weight: 400;
}

/* Responsive */
@media (max-width: 992px) {
    .cons-table th {
        width: 40%;
        font-size: 14px;
        padding: 15px 18px;
    }

    .cons-table td {
        font-size: 14px;
        padding: 15px 18px;
    }
}

@media (max-width: 768px) {
    h3 {
        font-size: 22px;
    }

    .cons-table th {
        width: 45%;
        font-size: 13px;
        padding: 12px 15px;
    }

    .cons-table td {
        font-size: 13px;
        padding: 12px 15px;
    }

    .cons-table td textarea {
        font-size: 13px;
        padding: 10px;
    }

    .info {
        font-size: 14px;
        padding: 15px 18px;
    }

    .cons-table.table-striped thead tr th {
        font-size: 13px;
        padding: 12px 10px;
    }

    .cons-table.table-striped tbody tr td {
        padding: 12px 10px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    /* Convertir tabla de detalles a diseño apilado en móviles */
    .cons-table {
        font-size: 13px;
    }

    .cons-table th,
    .cons-table td {
        display: block;
        width: 100%;
        text-align: left;
    }

    .cons-table th {
        border-radius: 4px 4px 0 0;
        padding: 10px 15px;
    }

    .cons-table td {
        border-radius: 0 0 4px 4px;
        padding: 10px 15px;
        margin-bottom: 15px;
    }

    .cons-table tr {
        display: block;
        margin-bottom: 20px;
        border-radius: 4px;
        overflow: hidden;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .breadcrumb {
        font-size: 12px;
    }

    .info {
        font-size: 13px;
        padding: 12px 15px;
    }

    /* Tabla de delegaciones en móvil */
    .cons-table.table-striped thead {
        display: none;
    }

    .cons-table.table-striped tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
        border-radius: 6px;
        overflow: hidden;
    }

    .cons-table.table-striped tbody tr td {
        display: block;
        text-align: right;
        padding: 10px 15px;
        border-bottom: 1px solid #e9ecef;
        position: relative;
    }

    .cons-table.table-striped tbody tr td:last-child {
        border-bottom: none;
    }

    .cons-table.table-striped tbody tr td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: #2E3191;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel.panel-default {
    animation: fadeIn 0.5s ease-out;
}

/* Mejora del contenedor */
.container {
    max-width: 1200px;
}

/* Mejoras visuales para valores específicos */
.cons-table td:contains("NO ACEPTA") {
    color: #721c24;
}

.cons-table td:contains("ACEPTA") {
    color: #155724;
}

/* Separador visual entre secciones */
.panel.panel-default + .info {
    margin-top: 50px;
}

/* Estilos para mejorar la jerarquía visual */
.text-center {
    position: relative;
}

/* Efecto de carga */
.panel.panel-default:nth-of-type(2) {
    animation-delay: 0.1s;
}

/* Sombra adicional al hacer scroll */
.panel.panel-default:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease;
}