/**
 * Estilos para el área pública del plugin.
 */

/* Estilos generales */
.tcn-form-container,
.tcn-access-container,
.tcn-about-container,
.tcn-admin-panel {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue",
    sans-serif;
  color: #333;
}

.tcn-form {
  margin-bottom: 20px;
}

.tcn-message {
  padding: 15px;
  margin-top: 20px;
  border-radius: 4px;
  display: none;
}

.tcn-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.tcn-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Progreso del formulario */
.tcn-form-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
  overflow-x: auto;
}

.tcn-progress-step {
  flex: 1;
  text-align: center;
  padding: 12px;
  background-color: #f8f8f8;
  border-radius: 4px;
  margin: 0 5px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
}

.tcn-progress-step.active {
  background-color: #004a99;
  color: #ffffff;
  border-color: #004a99;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 74, 153, 0.3);
}

/* Pasos del formulario */
.tcn-form-step {
  display: none;
  animation: fadeIn 0.5s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tcn-form-step.active {
  display: block;
}

.tcn-form-step h3 {
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #004a99;
  color: #004a99;
  font-weight: 600;
}

/* Grupos de formulario */
.tcn-form-group {
  margin-bottom: 20px;
  position: relative;
}

.tcn-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.tcn-form-group input[type="text"],
.tcn-form-group input[type="email"],
.tcn-form-group input[type="tel"],
.tcn-form-group input[type="number"],
.tcn-form-group input[type="date"],
.tcn-form-group input[type="password"],
.tcn-form-group select,
.tcn-form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tcn-form-group input:focus,
.tcn-form-group select:focus,
.tcn-form-group textarea:focus {
  border-color: #004a99;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 74, 153, 0.1);
}

.tcn-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.tcn-radio-group label {
  display: flex;
  align-items: center;
  font-weight: normal;
  cursor: pointer;
}

.tcn-radio-group input[type="radio"] {
  margin-right: 8px;
  cursor: pointer;
}

/* Botones */
.tcn-form-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.tcn-prev-step,
.tcn-next-step,
.tcn-submit-form,
.tcn-submit-access {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.tcn-prev-step {
  background-color: #f8f8f8;
  color: #333;
  border: 1px solid #ddd;
}

.tcn-next-step,
.tcn-submit-form,
.tcn-submit-access {
  background-color: #004a99;
  color: #ffffff;
}

.tcn-prev-step:hover {
  background-color: #e0e0e0;
}

.tcn-next-step:hover,
.tcn-submit-form:hover,
.tcn-submit-access:hover {
  background-color: #003366;
}

/* Experiencia laboral */
.tcn-experiencia-item {
  background-color: #f8f8f8;
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 20px;
  position: relative;
  border-left: 4px solid #ffc72c;
}

.tcn-remove-experiencia {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  font-size: 18px;
  transition: color 0.3s ease;
}

.tcn-remove-experiencia:hover {
  color: #a71d2a;
}

#tcn-add-experiencia {
  background-color: #f7941d;
  color: #ffffff;
  border: none;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

#tcn-add-experiencia:hover {
  background-color: #e07e0c;
}

/* Campos requeridos */
.required {
  color: #dc3545;
  margin-left: 3px;
}

/* Campos con error */
.tcn-error-field {
  border-color: #dc3545 !important;
  background-color: #fff8f8;
}

.tcn-error-message {
  color: #dc3545;
  font-size: 14px;
  margin-top: 5px;
  display: block;
}

.tcn-highlight-error {
  animation: highlightError 1.5s;
}

@keyframes highlightError {
  0%,
  100% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(220, 53, 69, 0.1);
  }
}

/* Resumen de errores */
#tcn-error-summary {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 15px;
  border-radius: 4px;
  margin: 20px 0;
  display: none;
}

#tcn-error-summary h4 {
  margin-top: 0;
  margin-bottom: 10px;
}

#tcn-error-summary ul {
  margin-bottom: 0;
  padding-left: 20px;
}

#tcn-error-summary a {
  color: #721c24;
  text-decoration: underline;
}

#tcn-error-summary a:hover {
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .tcn-form-progress {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .tcn-progress-step {
    flex: 0 0 auto;
    min-width: 120px;
  }

  .tcn-form-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .tcn-prev-step,
  .tcn-next-step,
  .tcn-submit-form,
  .tcn-submit-access {
    width: 100%;
  }
}

/* Crédito en el pie de página */
.tcn-footer-credit {
  margin-top: 30px;
  text-align: center;
  font-size: 12px;
  color: #888;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.tcn-footer-credit a {
  color: #004a99;
  text-decoration: none;
}

.tcn-footer-credit a:hover {
  text-decoration: underline;
}

/* Estilos para el loader */
.tcn-loading {
  position: relative;
  padding-left: 30px;
  background-color: #e9f0f7;
  color: #004a99;
  border: 1px solid #c5d8e8;
}

.tcn-loading:before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #004a99;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: translateY(-50%) rotate(0deg);
  }
  100% {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* Estilos específicos para el formulario de acceso */
.tcn-access-container {
  max-width: 500px;
  background-color: #ffffff;
  border-top: 4px solid #004a99;
}

.tcn-access-container h3 {
  color: #004a99;
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
}

.tcn-submit-access {
  width: 100%;
  background-color: #004a99;
}

/* Estilos para la sección "Acerca de" */
.tcn-about-container {
  text-align: center;
}

.tcn-about-content h2 {
  color: #004a99;
  margin-bottom: 20px;
}

.tcn-about-content p {
  margin-bottom: 15px;
}

/* Estilos para el panel de administración público */
.tcn-admin-panel {
  max-width: 1200px;
  background-color: #f9f9f9;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tcn-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.tcn-admin-header h2 {
  color: #004a99;
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.tcn-admin-actions {
  display: flex;
  gap: 10px;
}

/* Estilos para tarjetas */
.tcn-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-bottom: 25px;
}

.tcn-card-header {
  padding: 16px 20px;
  background-color: #f5f7fa;
  border-bottom: 1px solid #eaedf3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.tcn-card-footer {
  padding: 16px 20px;
  background-color: #f5f7fa;
  border-top: 1px solid #eaedf3;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Estilos para botones */
.tcn-button {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.tcn-button-primary {
  background-color: #004a99;
  color: #ffffff;
}

.tcn-button-primary:hover {
  background-color: #003a7a;
  color: #ffffff;
}

.tcn-button-secondary {
  background-color: #f0f2f5;
  color: #333;
  border: 1px solid #ddd;
}

.tcn-button-secondary:hover {
  background-color: #e4e6e9;
}

.tcn-action-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px; /* Aumentado de 8px a 10px */
  border-radius: 4px;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px; /* Añadido para asegurar un tamaño mínimo */
  min-height: 40px; /* Añadido para asegurar un tamaño mínimo */
}

.tcn-action-button:hover {
  background-color: #f0f2f5;
}

/* Estilos para la tabla */
.tcn-table-container {
  overflow-x: auto;
  margin-bottom: 0;
}

.tcn-applications-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
  font-size: 14px;
}

.tcn-applications-table th,
.tcn-applications-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #eaedf3;
  vertical-align: middle;
}

.tcn-applications-table th {
  background-color: #f5f7fa;
  font-weight: 600;
  color: #4a5568;
  position: sticky;
  top: 0;
  z-index: 10;
}

.tcn-applications-table tr:hover {
  background-color: #f9fafb;
}

.tcn-applications-table tr:last-child td {
  border-bottom: none;
}

.tcn-check-column {
  width: 40px;
  text-align: center;
}

.tcn-applicant-name {
  font-weight: 600;
  color: #2d3748;
}

.tcn-applications-table a {
  color: #004a99;
  text-decoration: none;
}

.tcn-applications-table a:hover {
  text-decoration: underline;
}

.tcn-action-buttons {
  display: flex;
  gap: 15px; /* Aumentado de 12px a 15px */
  justify-content: center;
}

/* Estilos para búsqueda y filtros */
.tcn-search-box {
  display: flex;
  align-items: center;
  max-width: 300px;
  width: 100%;
}

.tcn-search-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-right: none;
  border-radius: 6px 0 0 6px;
  font-size: 14px;
}

.tcn-search-field {
  min-width: 150px;
  margin-left: -1px;
  border-radius: 0;
  border-left: none;
}

.tcn-search-button {
  border-radius: 0 6px 6px 0;
}

.tcn-search-button {
  padding: 10px 12px;
  background-color: #f0f2f5;
  border: 1px solid #ddd;
  border-left: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
}

.tcn-search-button:hover {
  background-color: #e4e6e9;
}

.tcn-select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background-color: #fff;
  min-width: 180px;
}

.tcn-bulk-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Estilos para paginación */
.tcn-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.tcn-pagination-info {
  font-size: 14px;
  color: #666;
}

/* Estilos para mensajes de no data */
.tcn-no-data {
  padding: 40px 20px;
  text-align: center;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tcn-no-data-icon {
  font-size: 48px;
  margin-bottom: 15px;
  color: #cbd5e0;
}

.tcn-no-data p {
  font-size: 16px;
  color: #718096;
  margin: 0;
}

/* Estilos para modal */
.tcn-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);
  animation: fadeIn 0.3s;
}

.tcn-modal-content {
  max-width: 800px;
  max-height: 85vh;
}

.tcn-modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s;
  overflow: hidden;
}

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

.tcn-modal-header {
  padding: 16px 20px;
  background-color: #f5f7fa;
  border-bottom: 1px solid #eaedf3;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tcn-modal-header h3 {
  margin: 0;
  color: #2d3748;
  font-size: 18px;
  font-weight: 600;
}

.tcn-modal-close {
  color: #a0aec0;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.tcn-modal-close:hover {
  color: #4a5568;
}

.tcn-modal-body {
  max-height: calc(85vh - 120px);
  overflow-y: auto;
}

.tcn-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.tcn-modal-footer {
  padding: 16px 20px;
  background-color: #f5f7fa;
  border-top: 1px solid #eaedf3;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Estilos para detalles de la aplicación */
.tcn-application-details-container {
  margin-top: 0;
}

.tcn-detail-section {
  background-color: #f9fafb;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.tcn-detail-section {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eaedf3;
}

.tcn-detail-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.tcn-detail-section h4 {
  color: #004a99;
  border-bottom: 1px solid #e0e7ff;
  padding-bottom: 8px;
  margin-top: 0;
}

.tcn-detail-section h4 {
  color: #004a99;
  margin-bottom: 15px;
  font-weight: 600;
  font-size: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eaedf3;
}

.tcn-detail-row {
  display: flex;
  margin-bottom: 12px;
  border-bottom: 1px dashed #eaedf3;
  padding-bottom: 8px;
}

.tcn-detail-row:last-child {
  border-bottom: none;
}

.tcn-detail-row {
  display: flex;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tcn-detail-label {
  font-weight: 600;
  color: #4a5568;
  width: 30%;
  min-width: 150px;
}

.tcn-detail-label {
  font-weight: 600;
  width: 30%;
  min-width: 150px;
  color: #4a5568;
  padding-right: 15px;
}

.tcn-detail-value {
  color: #2d3748;
  width: 70%;
}

.tcn-detail-value {
  width: 70%;
  color: #2d3748;
}

.tcn-cv-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 16px;
  background-color: #f0f2f5;
  border-radius: 6px;
  text-decoration: none;
  color: #004a99;
  font-weight: 500;
  transition: background-color 0.2s;
}

.tcn-cv-link:hover {
  background-color: #e4e6e9;
}

/* Iconos para el panel público */
.tcn-icon {
  font-size: 24px !important; /* Aumentado de 16px a 24px */
  display: inline-block;
  line-height: 1;
}

/* Estilos para dispositivos móviles */
@media (max-width: 768px) {
  .tcn-admin-panel {
    padding: 15px;
  }

  .tcn-admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tcn-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tcn-search-box {
    max-width: 100%;
    margin-bottom: 10px;
  }

  .tcn-bulk-actions {
    width: 100%;
  }

  .tcn-select {
    flex: 1;
  }

  .tcn-applications-table {
    font-size: 13px;
  }

  .tcn-applications-table th,
  .tcn-applications-table td {
    padding: 10px 12px;
  }

  .tcn-detail-row {
    flex-direction: column;
  }

  .tcn-detail-label,
  .tcn-detail-value {
    width: 100%;
  }

  .tcn-modal-content {
    width: 95%;
    margin: 10% auto;
  }

  .tcn-modal-footer {
    flex-direction: column;
  }

  .tcn-modal-footer .tcn-button {
    width: 100%;
  }
}

.tcn-experiencia-item {
  background-color: #fff;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media print {
  body * {
    visibility: hidden;
  }
  .tcn-modal-content,
  .tcn-modal-content * {
    visibility: visible;
  }
  .tcn-modal-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 15px;
    box-shadow: none;
  }
  .tcn-modal-footer,
  .tcn-modal-close {
    display: none;
  }
}

/* Añadir estilos para la fecha de aplicación */
.tcn-application-date {
  margin-top: 10px;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border-left: 3px solid #004a99;
  font-weight: 500;
  color: #333;
}

/* Estilos para el manejo de arrastrar y soltar en la configuración */
.tcn-drag-handle {
  cursor: move;
  width: 30px;
  text-align: center;
  color: #999;
}

.tcn-drag-handle:hover {
  color: #444;
}

.tcn-sortable-placeholder {
  height: 40px;
  background-color: #f1f1f1;
  border: 1px dashed #ccc;
}

.ui-sortable-helper {
  display: table;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Estilos para el mensaje de éxito */
.tcn-success-container {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 8px;
  padding: 20px;
  margin: 30px 0;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tcn-success-icon {
  background-color: #28a745;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-right: 20px;
  flex-shrink: 0;
}

.tcn-success-message {
  color: #155724;
  font-size: 16px;
  line-height: 1.5;
}

.tcn-application-date {
  margin-top: 15px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .tcn-success-container {
    flex-direction: column;
    text-align: center;
  }

  .tcn-success-icon {
    margin-right: 0;
    margin-bottom: 15px;
  }
}
