/* /assets/css/cpp-programador.css */

/* --- Contenedor Principal --- */
.cpp-programador-container { background-color: #fff; border: 1px solid #e0e0e0; margin-top: 20px; border-radius: 8px; overflow: hidden; }

/* Pestañas */
.cpp-programador-tabs { display: flex; border-bottom: 1px solid #e0e0e0; background-color: #f8f9fa; }
.cpp-tab-link { padding: 15px 25px; cursor: pointer; border: none; background: none; border-bottom: 3px solid transparent; font-size: 15px; font-weight: 500; color: #5f6368; margin: 0; }
.cpp-tab-link.active { color: #1a73e8; border-bottom-color: #1a73e8; background-color: #fff; }

/* Contenido de Pestañas */
.cpp-programador-content { padding: 24px; overflow-y: auto; }
.cpp-tab-content { display: none; }
.cpp-tab-content.active { display: block; }

/* --- Pestaña de Programación --- */
.hidden { display: none !important; }

#cpp-main-tab-programacion.active {
    display: flex;
    flex-direction: column;
    padding: 24px; /* Añadir padding que se quitó del contenedor padre */
    height: 100%;
}

.cpp-programacion-controls {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 101;
}

.cpp-programacion-alert-sticky {
    position: sticky;
    top: 65px; /* Ajustar según altura de controles */
    z-index: 100;
    background-color: #fff4f4;
    border: 1px solid #ffcccc;
    color: #cc0000;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.cpp-programacion-main-controls {
    display: flex;
    gap: 20px;
    align-items: center;
}
.cpp-programacion-controls label { margin-bottom: 0; display:flex; align-items:center; gap: 8px; font-size: 14px; font-weight: 500; }
#cpp-programacion-clase-selector, #cpp-programacion-evaluacion-selector, #cpp-start-date-selector { padding: 8px; border-radius: 4px; border: 1px solid #ccc; }

#cpp-sesion-bulk-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

#cpp-sesion-bulk-actions .cpp-btn-danger {
    background-color: #d63638;
    color: white;
    border-color: #d63638;
}
#cpp-sesion-bulk-actions .cpp-btn-danger:hover {
    background-color: #b02a2c;
    border-color: #b02a2c;
}

.cpp-programacion-layout {
    display: flex;
    gap: 20px;
    flex-grow: 1;
    overflow: hidden; /* Evita que el layout se desborde */
}
.cpp-programacion-left-col {
    width: 400px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Scroll independiente */
}
.cpp-programacion-right-col {
    flex-grow: 1;
    border-left: 1px solid #e0e0e0;
    padding-left: 20px;
    overflow-y: auto; /* Scroll independiente */
}

.cpp-sesiones-list-detailed { list-style: none; padding: 0; margin: 0; flex-grow: 1; border: 1px solid #e0e0e0; border-radius: 4px; }

.cpp-add-sesion-btn { margin-top: 15px; }
.cpp-sesion-list-item { padding: 10px; cursor: pointer; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 8px; position: relative; }
.cpp-sesion-list-item:hover { background-color: #f7f7f7; }
.cpp-sesion-list-item.active { background-color: #e8f0fe; font-weight: 500; color: #1a73e8; }

.cpp-sesion-fijada-item {
    background-color: #fafafa;
}
.cpp-sesion-fijada-item .cpp-sesion-handle {
    cursor: not-allowed;
    opacity: 0.3;
}

.cpp-sesion-date .cpp-sesion-fijada-icon {
    font-size: 12px; /* Más pequeño para que encaje con el texto de la fecha */
    cursor: help;
    display: inline-block; /* Para que se alinee bien con el texto */
    margin-left: 4px;
}
.cpp-sesion-list-item.cpp-sesion-hoy { border-left: 3px solid #28a745; }
.cpp-sesion-handle { cursor: move; color: #999; padding: 0 5px; }
.cpp-sesion-number { font-size: 13px; color: #888; }
.cpp-sesion-list-item.active .cpp-sesion-number { color: #1a73e8; }
.cpp-sesion-title { flex-grow: 1; }
.cpp-sesion-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto; /* Pushes the actions to the right */
}
.cpp-sesion-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    padding: 4px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}
.cpp-sesion-action-btn:hover {
    opacity: 1;
    background-color: #e0e0e0;
}
.cpp-sesion-action-btn svg {
    display: block;
}
.cpp-add-inline-sesion-btn {
    color: #006621;
}
.cpp-delete-sesion-btn {
    color: #a00;
}
.cpp-sesion-placeholder {
    height: 45px;
    background-color: #e8f0fe;
    border: 2px dashed #1a73e8;
    border-radius: 4px;
    margin: 5px 0;
    visibility: visible !important;
}

.cpp-sesion-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Changed from center to flex-start */
    margin-bottom: 20px;
}
.cpp-sesion-detail-meta {
    flex-shrink: 0;
    margin-left: 20px;
    text-align: right;
}
.cpp-sesion-detail-date-badge {
    background-color: #e8f0fe;
    color: #1a73e8;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.cpp-sesion-detail-notas {
    font-size: 13px;
    color: #e67e22;
    margin-top: 8px;
    background-color: #fffaf0;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #fdeccf;
    text-align: left;
}
.cpp-sesion-detail-title { flex-grow: 1; font-size: 22px; font-weight: 500; padding: 5px; margin-bottom: 0; border-radius: 4px; }
.cpp-sesion-detail-desc { font-size: 15px; line-height: 1.7; color: #333; padding: 5px; min-height: 100px; border-radius: 4px; }
.cpp-sesion-detail-title:hover, .cpp-sesion-detail-desc:hover, .cpp-sesion-detail-content:hover { background-color: #f0f8ff; }
.cpp-sesion-detail-title:focus, .cpp-sesion-detail-desc:focus, .cpp-sesion-detail-content:focus { background-color: #fff; box-shadow: 0 0 0 2px #1a73e8; outline: none; }
.cpp-empty-panel { display: flex; align-items: center; justify-content: center; height: 100%; color: #777; font-size: 16px; padding: 40px; }
.cpp-sesion-detail-section { margin-bottom: 20px; }
.cpp-sesion-detail-section h4 { font-size: 14px; text-transform: uppercase; color: #5f6368; margin-bottom: 8px; font-weight: 500; border-bottom: 1px solid #e0e0e0; padding-bottom: 5px; }
.cpp-sesion-detail-content { padding: 10px; border: 1px solid transparent; border-radius: 4px; line-height: 1.6; min-height: 60px; }

/* --- Sección de Actividades --- */
.cpp-actividades-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.cpp-actividad-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 8px;
    background-color: #fdfdfd;
    transition: background-color 0.3s;
}

.cpp-actividad-item.evaluable {
    background-color: #e8f0fe;
    border-left: 4px solid #1a73e8;
}

.cpp-actividad-titulo {
    flex-grow: 1;
    padding: 5px;
    border-radius: 3px;
}
.cpp-actividad-titulo:hover {
    background-color: #f0f0f0;
}
.cpp-actividad-titulo:focus {
    background-color: #fff;
    box-shadow: 0 0 0 2px #1a73e8;
    outline: none;
}

.cpp-actividad-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.cpp-actividad-categoria-selector {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
    font-size: 12px;
}

.cpp-delete-actividad-btn {
    background: none;
    border: none;
    color: #a00;
    cursor: pointer;
    opacity: 0.5;
    font-size: 16px;
}
.cpp-delete-actividad-btn:hover {
    opacity: 1;
}

/* Toggle Switch */
.cpp-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.cpp-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cpp-toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.cpp-toggle-switch label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.cpp-toggle-switch input:checked + label {
    background-color: #28a745;
}

.cpp-toggle-switch input:checked + label:before {
    transform: translateX(20px);
}


/* --- Pestaña de Horario (Rediseño) --- */
.cpp-horario-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px; /* Espacio vertical entre filas */
    table-layout: fixed;
}
.cpp-horario-table th {
    border: none;
    padding: 10px 12px;
    text-align: center;
    font-weight: 500;
    color: #5f6368;
    background-color: transparent;
}
.cpp-horario-table td {
    border: 1px solid #e8eaed;
    border-left: none;
    border-right: none;
    padding: 6px;
    text-align: center;
    vertical-align: middle;
    height: 80px;
    background-color: #fff;
    transition: background-color 0.2s ease;
    position: relative;
}

.cpp-horario-table tr > *:first-child {
    border-left: 1px solid #e8eaed;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}
.cpp-horario-table tr > *:last-child {
    border-right: 1px solid #e8eaed;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.cpp-horario-th-actions, .cpp-horario-td-actions {
    width: 50px;
}
.cpp-horario-th-hora {
    width: 100px;
}

.cpp-horario-td-hora, .cpp-horario-td-actions {
    font-weight: 500;
    color: #3c4043;
    background-color: #f8f9fa !important;
    vertical-align: middle;
}

.cpp-horario-td-actions {
    background-color: #fff !important;
}

.cpp-delete-slot-btn {
    background: none;
    border: none;
    color: #a00;
    cursor: pointer;
    opacity: 0.3;
    font-size: 16px;
    transition: opacity 0.2s ease;
}
.cpp-delete-slot-btn:hover {
    opacity: 1;
}

.cpp-btn-add-slot-header {
    padding: 6px !important;
    height: 32px !important;
    width: 32px !important;
    border-radius: 50% !important;
}

.cpp-horario-table td.has-class {
    border-left: 5px solid var(--class-color, #e0e0e0);
}
.cpp-horario-table td.has-class:first-child {
     border-left-width: 5px;
}


.cpp-horario-slot-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.cpp-horario-clase-selector {
    width: 100%;
    border: none;
    background-color: transparent;
    font-weight: 500;
    font-size: 13px;
    padding: 4px;
    margin-bottom: 4px;
    border-radius: 4px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}
.cpp-horario-clase-selector:focus {
    outline: none;
    box-shadow: 0 0 0 2px #1a73e8 inset;
}
.cpp-horario-notas-input {
    width: 100%;
    flex-grow: 1;
    border: none;
    background-color: transparent;
    font-size: 12px;
    padding: 4px;
    resize: none;
    color: #5f6368;
}
.cpp-horario-notas-input::placeholder {
    color: #9aa0a6;
}
.cpp-horario-notas-input:focus {
    outline: none;
    background-color: rgba(0,0,0,0.03);
}

/* --- Pestaña de Semana (Rediseño) --- */
#cpp-main-tab-semana.active {
    height: auto;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.cpp-semana-nav {
    display: none; /* Movido a la barra superior */
}
.cpp-semana-nav h3 {
    margin: 0 15px;
    font-size: 20px;
    font-weight: 500;
    color: #3c4043;
}
.cpp-btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #5f6368;
    font-size: 24px;
    padding: 5px 10px;
    border-radius: 50%;
    line-height: 1;
}
.cpp-btn-icon:hover {
    background-color: #f1f3f4;
    color: #202124;
}
.cpp-semana-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px;
    table-layout: fixed;
}
.cpp-semana-table th, .cpp-semana-table td {
    border: none;
    padding: 4px;
    text-align: left;
    vertical-align: top;
}
.cpp-semana-table th {
    background-color: transparent;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
    color: #5f6368;
    padding-bottom: 10px;
}
.cpp-semana-table th small {
    font-weight: 400;
    color: #5f6368;
    font-size: 13px;
}
td.cpp-semana-td-hora {
    font-weight: 500;
    font-size: 13px;
    color: #5f6368;
    padding-right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.cpp-semana-slot {
    background-color: #fff;
    border: 1px solid #e8eaed;
    border-left: 5px solid var(--class-color, #e0e0e0);
    padding: 12px;
    height: 100%;
    box-sizing: border-box;
    font-size: 13px;
    border-radius: 8px;
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
    cursor: pointer;
}
.cpp-semana-slot:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.cpp-semana-slot strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #202124;
}
.cpp-semana-slot p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #5f6368;
    line-height: 1.4;
}
.cpp-semana-notas-horario {
    font-style: italic;
    font-size: 12px !important;
    color: #e67e22 !important;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
    white-space: pre-wrap; /* This will respect newlines */
}
.cpp-semana-actividades-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    font-size: 12px;
}
.cpp-semana-actividades-list li {
    background-color: #f1f3f4;
    padding: 5px 8px;
    border-radius: 4px;
    margin-bottom: 5px;
    color: #3c4043;
}

.cpp-semana-today {
    background-color: #e8f0fe;
}
.cpp-semana-th-dia.cpp-semana-today {
    color: #1967d2;
    font-weight: 600;
}

/* Modales */
.cpp-modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); }
.cpp-modal-content { background-color: #fefefe; margin: 10% auto; padding: 20px 30px; border: 1px solid #888; width: 80%; max-width: 500px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); position: relative; }
.cpp-modal-close { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; position: absolute; top: 10px; right: 20px; }
.cpp-modal-close:hover, .cpp-modal-close:focus { color: black; }
.cpp-form-group { margin-bottom: 15px; }
.cpp-form-group label { display: block; margin-bottom: 5px; font-weight: 500; color: #444; }
.cpp-form-group input[type="text"], .cpp-form-group textarea { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }
.cpp-form-group .description { font-size: 12px; color: #666; font-style: italic; margin-top: 5px; }
.cpp-modal-actions { text-align: right; margin-top: 20px; padding-top: 15px; border-top: 1px solid #e0e0e0; }

/* Botones */
.cpp-btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; text-decoration: none; font-size: 13px; line-height: 2.15; min-height: 30px; margin: 0; padding: 0 10px; cursor: pointer; border-width: 1px; border-style: solid; border-radius: 3px; white-space: nowrap; box-sizing: border-box; background: #f0f0f1; border-color: #ccc; color: #333; }
.cpp-btn:hover { border-color: #999; }
.cpp-btn-primary { background: #2271b1; border-color: #2271b1; color: #fff; }
.cpp-btn-primary:hover { background: #1e639a; border-color: #1e639a; }
.cpp-btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Estilos para el Modal de Configuración */
.cpp-form-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cpp-form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.cpp-form-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

#cpp-working-days label {
    display: inline-block;
    margin-right: 15px;
    font-weight: normal;
}

.cpp-dynamic-list .cpp-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
    min-height: 50px;
}

.cpp-dynamic-list .cpp-list-item.editing {
    background-color: #f0f7ff;
    border-color: #1a73e8;
    padding: 15px; /* Dar un poco más de aire en modo edición */
    box-shadow: inset 0 0 0 1px #1a73e8;
}

.cpp-list-item.editing input[type="text"],
.cpp-list-item.editing input[type="date"] {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
}

.cpp-list-item.editing input[type="text"]:focus,
.cpp-list-item.editing input[type="date"]:focus {
    border-color: #1a73e8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

.cpp-list-item-actions .cpp-btn-icon-minimal svg {
    display: block;
}

.cpp-save-holiday-inline-btn, .cpp-save-vacation-inline-btn {
    color: #1e8e3e;
}

.cpp-cancel-holiday-inline-btn, .cpp-cancel-vacation-inline-btn {
    color: #d93025;
}

.cpp-dynamic-list .cpp-list-item span {
    font-family: monospace;
}

.cpp-dynamic-list .cpp-remove-btn {
    background: none;
    border: none;
    color: #d9534f;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}

/* --- Notificaciones --- */
.cpp-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 25px;
    border-radius: 6px;
    background-color: #28a745;
    color: white;
    font-size: 15px;
    z-index: 1001;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.cpp-notification.error {
    background-color: #dc3545;
}

.cpp-notification.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
}

/* --- Estilos para la Paleta de Símbolos (Pop-up) --- */
.cpp-symbol-palette {
    position: absolute;
    z-index: 1010;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    padding: 12px;
    width: 250px;
}

/* Reutilizando la clase del cuaderno para la paleta de símbolos */
.cpp-symbol-palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 10px;
}

/* Estilos para los items de la grid (anterior .cpp-simbolo-item) */
.cpp-symbol-palette-grid .cpp-simbolo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    font-size: 24px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.cpp-symbol-palette-grid .cpp-simbolo-item:hover {
    background-color: #f1f3f4;
    transform: scale(1.05);
}

.cpp-symbol-palette-grid .cpp-simbolo-item.active {
    background-color: #e8f0fe;
    border-color: #1a73e8;
    color: #1a73e8;
    box-shadow: 0 0 0 2px #1a73e8;
}

#cpp-simbolos-leyendas-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    display: flex;
    flex-direction: column;
    gap: 12px; /* Un poco más de espacio */
}

#cpp-simbolos-leyendas-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

#cpp-simbolos-leyendas-list .leyenda-simbolo {
    font-size: 22px;
    width: 30px;
    text-align: center;
    flex-shrink: 0;
    color: #5f6368;
}

#cpp-simbolos-leyendas-list .leyenda-input {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#cpp-simbolos-leyendas-list .leyenda-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 1px #1a73e8;
}


#cpp-save-leyendas-btn {
    width: 100%;
    margin-top: 10px;
}

/* Aumentar tamaño del símbolo en la lista de sesiones */
.cpp-sesion-simbolo-container {
    font-size: 22px; /* Tamaño más grande para el símbolo */
    width: 40px;
    text-align: center;
}

/* --- START: Styles for Programmer Symbol Palette (Single Column Layout) --- */

/* This is the modal overlay */
.cpp-programador-symbol-palette {
    display: flex; /* Handled by JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1050;
    align-items: center;
    justify-content: center;
}

/* This is the modal content box */
.cpp-programador-symbol-palette .cpp-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 23px 5px rgba(0,0,0,0.2), 0 2px 6px rgba(0,0,0,0.15);
    max-width: 560px;
    width: 90%;
    padding: 24px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.cpp-programador-symbol-palette .cpp-modal-content h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.cpp-programador-symbol-palette .cpp-modal-content p {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #555;
}

/* Container for the new single-column list */
.cpp-programador-symbol-palette .cpp-symbol-list-container {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Each row contains a symbol and a legend input */
.cpp-programador-symbol-palette .cpp-symbol-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* The clickable symbol on the left */
.cpp-programador-symbol-palette .cpp-simbolo-item {
    flex: 0 0 45px; /* Fixed width */
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.cpp-programador-symbol-palette .cpp-simbolo-item:hover {
    background-color: #f1f3f4;
    border-color: #1a73e8;
}

.cpp-programador-symbol-palette .cpp-simbolo-item.active {
    background-color: #e8f0fe;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px #1a73e8;
}

/* The text input on the right */
.cpp-programador-symbol-palette .leyenda-input {
    flex: 1; /* Takes up remaining space */
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Styles for the "No Symbol" row */
.cpp-programador-symbol-palette .cpp-symbol-row.no-leyenda {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
}
.cpp-programador-symbol-palette .cpp-symbol-row.no-leyenda .leyenda-label {
    flex: 1;
    font-size: 14px;
    color: #555;
    font-style: italic;
}

.cpp-programador-symbol-palette .cpp-modal-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
}

.cpp-semana-simbolo {
    font-size: 0.9em;
    margin-right: 4px;
    display: inline-block;
}

/* Nuevo estilo para el botón PDF y navegación de cabecera */
.cpp-btn-pdf {
    background-color: #e8f0fe !important;
    color: #1a73e8 !important;
    border: 1px solid #d2e3fc !important;
    font-weight: 600 !important;
    border-radius: 20px !important;
    padding: 0 20px !important;
    transition: all 0.2s ease !important;
}

.cpp-btn-pdf:hover {
    background-color: #1a73e8 !important;
    color: white !important;
    box-shadow: 0 2px 6px rgba(26,115,232,0.3) !important;
}

#cpp-semana-header-nav .cpp-btn-icon {
    color: #5f6368;
    background: #f1f3f4;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s;
}

#cpp-semana-header-nav .cpp-btn-icon:hover {
    background-color: #e8eaed;
    color: #202124;
}

#cpp-semana-header-nav .cpp-btn-icon .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
}

/* Animaciones de deslizamiento para la semana */
.cpp-semana-table-container {
    overflow-x: hidden;
    overflow-y: visible;
    position: relative;
    width: 100%;
    flex-grow: 1;
}

.cpp-semana-table.slide-out-left {
    animation: cppSlideOutLeft 0.3s forwards ease-in;
}
.cpp-semana-table.slide-in-right {
    animation: cppSlideInRight 0.3s forwards ease-out;
}
.cpp-semana-table.slide-out-right {
    animation: cppSlideOutRight 0.3s forwards ease-in;
}
.cpp-semana-table.slide-in-left {
    animation: cppSlideInLeft 0.3s forwards ease-out;
}

@keyframes cppSlideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}
@keyframes cppSlideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes cppSlideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
@keyframes cppSlideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.cpp-semana-fijada-icon {
    font-size: 0.8em;
    cursor: help;
    display: inline-block;
    vertical-align: middle;
}

/* --- END: Styles for Programmer Symbol Palette --- */

/* Fix for pin button turning black on click */
#cpp-programador-pin-sesion-btn:active,
#cpp-programador-pin-sesion-btn.active {
    background-color: #e8f0fe !important;
    color: #1a73e8 !important;
    box-shadow: none !important;
}

/* Switch Toggle Styles */
.cpp-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.cpp-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cpp-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.cpp-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
}

input:checked + .cpp-slider {
  background-color: #1a73e8;
}

input:focus + .cpp-slider {
  box-shadow: 0 0 1px #1a73e8;
}

input:checked + .cpp-slider:before {
  transform: translateX(22px);
}

.cpp-slider.round {
  border-radius: 24px;
}

.cpp-slider.round:before {
  border-radius: 50%;
}

/* Public View Styles */
body.cpp-public-view {
    background-color: #f8f9fa;
}

body.cpp-public-view .cpp-cuaderno-viewport-classroom {
    padding: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
}

body.cpp-public-view .cpp-fullscreen-settings-header {
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    padding-left: 15px;
    padding-right: 15px;
}

body.cpp-public-view .cpp-fullscreen-settings-content {
    background: white;
    padding: 0 !important;
    border-radius: 0;
    box-shadow: none;
}

/* Shared Page Layout Fixes */
.cpp-shared-view-container {
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    background: white;
    z-index: 99999;
    overflow-y: auto;
}

.cpp-shared-view-container .cpp-fullscreen-settings-page {
    position: relative !important;
    height: auto !important;
    min-height: 100vh;
}

.cpp-semana-slot-non-clickable {
    background-color: #fff !important;
    border: 1px solid #e8eaed !important;
    border-left-width: 5px !important;
    border-left-style: solid !important;
    border-left-color: #e0e0e0 !important;
    padding: 12px !important;
    height: 100% !important;
    box-sizing: border-box !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    cursor: default !important;
    box-shadow: none !important;
    display: block !important;
}

.cpp-semana-slot-non-clickable strong {
    display: block !important;
    margin-bottom: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #202124 !important;
}

.cpp-semana-slot-non-clickable p {
    margin: 0 0 8px 0 !important;
    font-size: 13px !important;
    color: #5f6368 !important;
    line-height: 1.4 !important;
}

/* Ensure activities list inside non-clickable slots looks correct */
.cpp-semana-slot-non-clickable .cpp-semana-actividades-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 10px 0 0 0 !important;
    font-size: 12px !important;
}

.cpp-semana-slot-non-clickable .cpp-semana-actividades-list li {
    background-color: #f1f3f4;
    padding: 5px 8px;
    border-radius: 4px;
    margin-bottom: 5px;
    color: #3c4043;
}
