/* ================================
   ESTILOS DEL PLUGIN (Resultados Lab)
================================ */

/* Contenedor principal para front-end */
.rlab-container {
    padding: 20px;
    background-color: #fff;
}

/* Estilos generales */
.rlab-error {
    color: #f00 !important;
}
.rlab-success {
    color: #4caf50;
    font-weight: bold;
}
.button {
    cursor: pointer;
}

/* ----------- ADMIN AREA ---------- */
.rlab-admin-wrap .rlab-search-form {
    margin-bottom: 20px;
}
.rlab-drag-drop-area {
    cursor: pointer;
    background-color: #fafafa;
    border: 2px dashed #ccc;
    padding: 20px;
    border-radius: 5px;
    transition: background-color 0.3s, border-color 0.3s;
    margin-bottom: 10px;
    text-align: center;
}
.rlab-drag-drop-area.dragover {
    background-color: #eaf7ff;
    border-color: #333;
}
.rlab-progress-bar {
    width: 0;
    height: 20px;
    background-color: #4caf50;
    color: #fff;
    text-align: center;
    margin: 5px 0;
}
#rlab-progress-text {
    position: relative;
    top: -20px;
    width: 100%;
    text-align: center;
}
#rlab-upload-status p {
    font-size: 0.9em;
    color: #555;
}
.rlab-table-container {
    overflow-x: auto;
}
.rlab-files-table td,
.rlab-files-table th {
    vertical-align: middle;
}
.rlab-action-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
}
.rlab-inline-form {
    display: inline;
}

/* Paginador en admin */
.rlab-pagination {
    margin-top: 15px;
}
.rlab-pagination a,
.rlab-pagination span {
    margin-right: 5px;
    font-size: 0.9em;
}
.rlab-files-table th[style*="width:300px;"] {
    min-width: 300px;
    width: 300px !important;
}

/* ----------- FRONT-END ---------- */
.rlab-page-title {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #004080;
}
.rlab-user-files-layout {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}
.rlab-files-left {
    flex: 3;
    margin-bottom: 20px;
}
.rlab-files-right {
    flex: 1;
    background: #f8f8f8;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.rlab-sidebar-title {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #333;
}

/* Grid de archivos */
.rlab-files-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.rlab-file-tile {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: calc(33.33% - 10px);
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
    transition: transform 0.2s ease;
    margin-bottom: 10px;
}
.rlab-file-tile:hover {
    transform: translateY(-3px);
}
.rlab-file-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}
.rlab-file-name {
    font-weight: bold;
    margin: 5px 0 2px 0;
    font-size: 0.9em;
}
.rlab-file-date {
    font-size: 0.8em;
    color: #666;
}

/* Lightbox Front-end */
#rlab-lightbox-frontend {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}
#rlab-lightbox-frontend .rlab-lightbox-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    max-width: 800px;
    padding: 0;
    border-radius: 5px;
}
#rlab-lightbox-close-frontend {
    position: absolute;
    top: 8px;
    right: 16px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
#rlab-lightbox-frame-frontend {
    width: 100%;
    height: 600px;
}

/* Acordeón para front-end */
.rlab-accordion-year {
    border-bottom: 1px solid #ddd;
}
.rlab-year-header {
    background: #e9e9e9;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 0.9em;
}
.rlab-year-header:hover {
    background: #dcdcdc;
}
.rlab-folder-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}
.rlab-year-content {
    display: none;
    padding: 5px 10px;
    background: #fff;
}
.rlab-month-link {
    display: block;
    padding: 3px 0;
    font-size: 0.9em;
    color: #0073aa;
    text-decoration: none;
}
.rlab-month-link:hover {
    text-decoration: underline;
}

/* Paginador en front-end */
.rlab-pagination {
    margin-top: 15px;
}
.rlab-pagination a,
.rlab-pagination span {
    margin-right: 5px;
    font-size: 0.9em;
}

/* FRONT: Perfil */
.rlab-profile-form-container {
    margin: 20px 0;
    max-width: 600px;
}
.rlab-profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.rlab-profile-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid #ccc;
}
.rlab-profile-name {
    font-size: 1.1em;
    font-weight: bold;
}
.rlab-profile-form .rlab-field-group {
    margin-bottom: 15px;
}
.rlab-profile-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.9em;
}
.rlab-profile-form input[type="text"],
.rlab-profile-form input[type="email"],
.rlab-profile-form input[type="password"],
.rlab-profile-form input[type="file"] {
    width: 100%;
    padding: 7px;
    box-sizing: border-box;
    font-size: 0.9em;
}
#rlab-email-feedback {
    font-size: 0.8em;
}
/* =========================================================================
   1. SECCIONES PARA RESULTADOS Y PERFIL (toggle con menú)
   ========================================================================= */

/* Ambas secciones comparten estilos de contenedor */
#lab-results-section,
#lab-profile-section {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 20px;
  margin-top: 20px;    /* Espacio con respecto al menú o hero */
}

/* Mostramos por defecto la sección de Resultados */
#lab-results-section {
  display: block;      /* Visible inicialmente */
}

/* Ocultamos la sección de Perfil si no se ha hecho clic en el menú */
#lab-profile-section {
  display: none;       /* Oculta inicialmente */
}

/* =========================================================================
   2. MENÚ HORIZONTAL (si no lo tenías ya)
   ========================================================================= */
.lab-user-menu {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
  text-align: center;
}

.lab-user-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;              
  justify-content: center;    
  background-color: #f1f1f1;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lab-user-menu li {
  margin: 0;
}

.lab-user-menu li a {
  display: block;
  padding: 12px 25px;
  color: #333;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.lab-user-menu li a:hover,
.lab-user-menu li a.lab-menu-active {
  background-color: #004080;
  color: #fff !important;
}

/* =========================================================================
   3. HERO (si usas el bloque azul a ancho completo)
   ========================================================================= */
.lab-hero {
  width: 100vw !important;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 60px 20px !important;
  background-color: #004080 !important; 
  color: #fff !important;              
  text-align: center !important;
  box-sizing: border-box;
}

.lab-hero-title,
.lab-hero-subtitle {
  color: #fff !important;
}

/* =========================================================================
   4. MEDIA QUERIES (RESPONSIVE)
   ========================================================================= */
@media (max-width: 768px) {
  #lab-results-section, 
  #lab-profile-section {
    margin-top: 15px;
  }
  .lab-user-menu ul {
    flex-direction: column;
    align-items: stretch;
  }
  .lab-user-menu li a {
    text-align: center;
    border-bottom: 1px solid #eee;
  }
  .lab-hero {
    padding: 40px 10px !important;
  }
  .lab-hero-title {
    font-size: 2rem !important;
  }
}
