:root {
    --color-primary-green: #02723b;
    --color-border-green: #027713;
    --color-bg-lightgray: lightgray;
}

body {
    background-color: var(--color-bg-lightgray);
}

/* CSV export (excel icon) */
.excel-icon {
    color: var(--color-primary-green);
    padding-top: 35px;
}

/* acentuar más los hr */
hr {
    border: none;
    border-bottom: 2px dashed var(--color-border-green);
}

/* datatables cells */
td {
    vertical-align: top !important;
}

#tabla_impersonation td {
    vertical-align: middle !important;
}

table.dataTable tbody tr:hover {
    background-color: #fdfdfd;
}

/* accordions */
div.accordion div.panel {
    margin-bottom: 0px;
    border: none;
}

div.accordion .panel-title {
    font-size: 13px;
}

div.accordion .panel-heading {
    background-color: #EDEDED;
}

div.accordion .panel-body {
    border: 1px solid #DDD;
    border-top-style: none;
    padding-bottom: 0px;
}

div.accordion.indicadores .panel-body {
    border: none;
    padding: 0px;
}

/* arreglar comportamiento raro en el hover de los menús */
.dropdown-menu>li:hover>a {
    background-color: rgb(51, 51, 51) !important;
}

.dropdown-menu>li>a:hover {
    background-color: #777 !important;
}

/* hover colors for datatables */
.table-hover>tbody>tr:hover,
.table-hover>tbody>tr:hover>td {
    background: #fdfdfd !important;
}

/* compact tables in teacher view */
#tabla_values th,
#tabla_values td,
#tabla_resultados_encuestas th,
#tabla_resultados_encuestas td,
div.accordion.indicadores table.table th,
div.accordion.indicadores table.table td {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

div.accordion.indicadores table.table {
    margin-bottom: 0 !important;
}

#tabla_resultados_encuestas {
    table-layout: fixed !important;
}

/* Custom styles for teacher view accordions */
div.accordion.indicadores .panel-body {
    border: none !important;
    padding: 0 !important;
    /* Set padding to zero as requested by user */
}

/* Remove uppercase header text-transform on the inner tables and keep it bold */
#tabla_resultados_encuestas div.accordion table.table th {
    text-transform: none !important;
    font-weight: bold !important;
}

/* Remove card-like rounded corners from the inner tables, cells and rows */
#tabla_resultados_encuestas div.accordion table.table,
#tabla_resultados_encuestas div.accordion table.table th,
#tabla_resultados_encuestas div.accordion table.table td,
#tabla_resultados_encuestas div.accordion table.table tr,
#tabla_resultados_encuestas div.accordion .panel-body {
    border-radius: 0 !important;
}

/* Ensure inner table inside indicators fits perfectly 100% flush without double borders */
#tabla_resultados_encuestas div.accordion.indicadores table.table {
    margin: 0 !important;
    width: 100% !important;
    border: none !important;
    /* remove outer table border */
}

#tabla_resultados_encuestas div.accordion.indicadores table.table th,
#tabla_resultados_encuestas div.accordion.indicadores table.table td {
    border-left: none !important;
    border-right: none !important;
}

#tabla_resultados_encuestas div.accordion.indicadores table.table tr:first-child th,
#tabla_resultados_encuestas div.accordion.indicadores table.table tr:first-child td {
    border-top: none !important;
}

#tabla_resultados_encuestas div.accordion.indicadores table.table tr:last-child th,
#tabla_resultados_encuestas div.accordion.indicadores table.table tr:last-child td {
    border-bottom: none !important;
}

/* Keep the panel heading and toggle link styling clean and compact */
#tabla_resultados_encuestas div.accordion .panel-heading,
#tabla_resultados_encuestas div.accordion .panel-default>.panel-heading {
    background-color: #EDEDED !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 0 !important;
}

#tabla_resultados_encuestas div.accordion .panel-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
}

#tabla_resultados_encuestas div.accordion .panel-heading a.accordion-toggle {
    display: block !important;
    padding: 6px 15px !important;
    /* original compact padding */
    color: #333 !important;
    text-decoration: none !important;
    position: relative !important;
    background-color: #EDEDED !important;
}

/* ensure plus/minus icons are correctly positioned on the right and look clean */
#tabla_resultados_encuestas div.accordion .panel-heading a.accordion-toggle::after {
    font-family: "FontAwesome" !important;
    content: "\f068" !important;
    /* minus */
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px !important;
    color: #888 !important;
}

#tabla_resultados_encuestas div.accordion .panel-heading a.accordion-toggle.collapsed::after {
    content: "\f067" !important;
    /* plus */
}

/* Style accordion panels cleanly, removing default margins/shadows and using a single neat border */
#tabla_resultados_encuestas div.accordion .panel {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}

/* Separate adjacent comments/indicator accordion panels slightly to avoid overlapping or double-thick borders */
#tabla_resultados_encuestas div.accordion .panel+.panel {
    margin-top: 5px !important;
    /* very small separation */
}

/* Remove default panel-heading bottom border to avoid double borders when collapsed */
#tabla_resultados_encuestas div.accordion .panel-heading,
#tabla_resultados_encuestas div.accordion .panel-default>.panel-heading {
    border: none !important;
    border-bottom: none !important;
}

/* Remove panel-body borders to prevent double borders when expanded */
#tabla_resultados_encuestas div.accordion .panel-body {
    border: none !important;
}

/* Zebra striping for main results table rows (alternating white and light gray) */
#tabla_resultados_encuestas>tbody>tr:nth-of-type(odd) {
    background-color: #ffffff !important;
}

#tabla_resultados_encuestas>tbody>tr:nth-of-type(even) {
    background-color: #f8f9fa !important;
}

#tabla_resultados_encuestas>tbody>tr:hover,
#tabla_resultados_encuestas>tbody>tr:hover>td {
    background-color: #f1f3f5 !important;
}

/* Custom styling for admin section titles */
.section-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    padding-top: 0px !important;
    margin-top: 5px !important;
    margin-bottom: 10px !important;
    color: #333 !important;
    border-bottom: 1px solid #eef1f5;
    padding-bottom: 8px !important;
    width: 100%;
}

.section-title i {
    margin-right: 8px;
    color: #45b6af;
}

.section-title i.popovers {
    font-size: 16px;
    margin-left: 5px;
    color: #999;
    vertical-align: middle;
}

/* Reduce top margins for hr preceding section titles to balance spacings */
.portlet-body hr {
    margin-top: 12px !important;
    margin-bottom: 5px !important;
}

/* Force Vich Uploader Seleccionar Fichero button to be blue, avoiding theme success override */
.vich-file .btn.btn-primary {
    background-color: #337ab7 !important;
    border-color: #2e6da4 !important;
    color: #fff !important;
}

.vich-file .btn.btn-primary:hover,
.vich-file .btn.btn-primary:focus,
.vich-file .btn.btn-primary:active {
    background-color: #286090 !important;
    border-color: #204d74 !important;
    color: #fff !important;
}

/* ─── CSV Upload Progress Modal ────────────────────────────────────────────── */
.csv-progress-header {
    margin-bottom: 20px;
}

.csv-progress-title {
    font-weight: 600;
}

.csv-progress-bar-wrapper {
    height: 25px;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f5f5f5;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.csv-progress-bar-inner {
    width: 0%;
    font-size: 13px;
    line-height: 25px;
    font-weight: bold;
    transition: width 0.4s ease;
}

.csv-progress-section {
    margin-top: 15px;
}

.csv-log-container {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    background-color: #fcfcfc;
}

.csv-log-list {
    font-size: 12px;
    font-family: monospace;
    line-height: 1.6;
    margin: 0;
    color: #555;
}

.csv-log-list .log-success {
    color: #2b542c;
}

.csv-log-list .log-error {
    color: #a94442;
}

.csv-log-list .log-info {
    color: #31708f;
}

/* ─── Teacher view ─────────────────────────────────────────────────────────── */
.survey-section {
    margin-top: 15px;
}

.survey-section-spaced {
    margin-top: 15px;
    margin-bottom: 25px;
}

.table-header-row {
    background-color: #ddd;
}

.est-input-group {
    width: 140px;
}

.survey-notes {
    text-align: right;
    margin-top: -25px;
}

.icon-comment {
    color: #23527c;
    margin-right: 3px;
}

/* Hidden form fields (Bootstrap 3 helper) */
.form-fields-hidden {
    display: none;
}