/* ===== ESTILOS PARA SHORTCODES DE APLICADOR ===== */

/* Panel principal del aplicador */
.pma-applier-panel {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.pma-applier-panel h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2em;
}

.pma-applier-panel h3 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1.3em;
}

/* Sección de créditos */
.pma-credits-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.pma-credits-display {
    font-size: 1.2em;
    margin: 0;
}

.pma-credits-display strong {
    font-size: 1.5em;
    color: #f1c40f;
}

/* Grid de estadísticas */
.pma-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.pma-stat-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pma-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.pma-stat-number {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 5px;
}

.pma-stat-label {
    color: #7f8c8d;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enlaces rápidos */
.pma-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.pma-link-card {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pma-link-card:hover {
    background: #f8f9fa;
    border-color: #3498db;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    text-decoration: none;
    color: #2c3e50;
}

.pma-link-card .dashicons {
    font-size: 1.5em;
    margin-right: 10px;
    color: #3498db;
}

/* Tablas del aplicador */
.pma-applier-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pma-applier-table th {
    background: #34495e;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.pma-applier-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e1e8ed;
    vertical-align: middle;
}

.pma-applier-table tr:hover {
    background: #f8f9fa;
}

.pma-applier-table tr:last-child td {
    border-bottom: none;
}

/* Estados */
.pma-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.pma-status-active {
    background: #d4edda;
    color: #155724;
}

.pma-status-closed {
    background: #f8d7da;
    color: #721c24;
}

.pma-status-publish {
    background: #d1ecf1;
    color: #0c5460;
}

/* Botones del aplicador */
.pma-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pma-button-primary {
    background: #3498db;
    color: white;
}

.pma-button-primary:hover {
    background: #2980b9;
    color: white;
    text-decoration: none;
}

.pma-button-small {
    padding: 4px 8px;
    font-size: 0.8em;
}

.pma-button .dashicons {
    margin-right: 5px;
}

/* Secciones específicas */
.pma-assignments-section,
.pma-quizzes-section,
.pma-candidates-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.pma-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.pma-section-header h2 {
    margin: 0;
    color: #2c3e50;
}

/* Bloqueo de scroll cuando hay modal abierto */
body.pma-modal-open {
    overflow: hidden !important;
}

/* Unificar estilos de .pma-modal y .pma-modal-content para todos los modales */
.pma-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    overflow-y: auto;
}

.pma-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.pma-modal-large {
    max-width: 700px !important;
    width: 95% !important;
    max-height: 90vh;
    overflow-y: auto;
}

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

.pma-modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease;
}
.pma-modal-close:hover {
    color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    .pma-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pma-links-grid {
        grid-template-columns: 1fr;
    }
    
    .pma-section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pma-applier-table {
        font-size: 0.9em;
    }
    
    .pma-applier-table th,
    .pma-applier-table td {
        padding: 8px 10px;
    }
    
    .link-copy-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .pma-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .pma-stat-number {
        font-size: 2em;
    }
    
    .pma-applier-panel,
    .pma-assignments-section,
    .pma-quizzes-section,
    .pma-candidates-section {
        padding: 15px;
    }
}

/* ===== ESTILOS PARA MODAL DE CREACIÓN DE ASIGNACIONES ===== */

/* Formulario de asignación */
.pma-assignment-form {
    margin-top: 20px;
}

.pma-form-group {
    margin-bottom: 20px;
}

.pma-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95em;
}

.pma-form-group input[type="text"],
.pma-form-group input[type="datetime-local"],
.pma-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.pma-form-group input[type="text"]:focus,
.pma-form-group input[type="datetime-local"]:focus,
.pma-form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.pma-form-group input[type="text"]::placeholder {
    color: #95a5a6;
    font-style: italic;
}

/* Fila de formulario para campos lado a lado */
.pma-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Descripción de campo */
.pma-field-description {
    margin-top: 5px;
    font-size: 0.85em;
    color: #7f8c8d;
    font-style: italic;
}

/* Acciones del formulario */
.pma-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
    flex-wrap: wrap;
}

.pma-form-actions .pma-button {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

/* Botón secundario */
.pma-button-secondary {
    background: #95a5a6;
    color: white;
}

.pma-button-secondary:hover {
    background: #7f8c8d;
    color: white;
    text-decoration: none;
}

/* Mensajes de estado */
.pma-messages {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    display: none;
}

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

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

.pma-message-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.pma-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Estados de carga */
.pma-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.pma-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: pma-spin 1s linear infinite;
}

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

/* Validación de campos */
.pma-form-group.error input,
.pma-form-group.error select {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.pma-form-group.error .pma-error-message {
    color: #e74c3c;
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
}

.pma-form-group.success input,
.pma-form-group.success select {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* Responsive para el modal de asignación */
@media (max-width: 768px) {
    .pma-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pma-form-actions {
        flex-direction: column;
    }
    
    .pma-form-actions .pma-button {
        width: 100%;
    }
    
    .pma-form-group input[type="text"],
    .pma-form-group input[type="datetime-local"],
    .pma-form-group select {
        padding: 10px 12px;
        font-size: 16px; /* Evita zoom en iOS */
    }
}

@media (max-width: 480px) {
    .pma-form-group {
        margin-bottom: 15px;
    }
    
    .pma-form-group label {
        font-size: 0.9em;
    }
}

/* ===== BLOQUE UNIFICADO DE APLICACIÓN (INSTRUCCIONES Y TEST) ===== */
.pma-aplicacion-block {
  max-width: 700px;
  margin: 2.5em auto 2.5em auto;
  padding: 2.5em 2em 2em 2em;
  background: #fcfcfd;
  border: 1.5px solid #bfc9d1;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(44, 62, 80, 0.07), 0 1.5px 4px rgba(52, 152, 219, 0.04);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.pma-aplicacion-block:focus-within, .pma-aplicacion-block:hover {
  border-color: #2980b9;
  box-shadow: 0 8px 32px rgba(52, 152, 219, 0.10), 0 2px 8px rgba(44, 62, 80, 0.08);
}
.pma-aplicacion-block h2 {
  margin-top: 0;
  color: #1a3557;
  font-size: 2em;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.01em;
}
.pma-aplicacion-block .pma-instrucciones-content {
  font-size: 1.08em;
  margin-bottom: 1.5em;
  color: #2c3e50;
  line-height: 1.7;
}
.pma-aplicacion-block .pma-quiz-form {
  margin: 0;
}
.pma-aplicacion-block .pma-slide {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 0;
}
.pma-aplicacion-block .pma-slide-header {
  margin-bottom: 1.5em;
}
.pma-aplicacion-block .pma-quiz-title {
  font-size: 1.35em;
  margin: 0;
  color: #1a3557;
  font-weight: 700;
  text-align: center;
}
.pma-aplicacion-block .pma-section-title {
  font-size: 1.08em;
  margin: 0.5em 0 1.2em;
  color: #2980b9;
  text-align: center;
  font-weight: 600;
}
.pma-aplicacion-block .pma-question-block {
  margin-bottom: 1.5em;
}
.pma-aplicacion-block .pma-question-text {
  font-size: 1.08em;
  margin-bottom: 1em;
  color: #2c3e50;
  font-weight: 500;
}
.pma-aplicacion-block .pma-answers-list {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
}
.pma-aplicacion-block .pma-answer-option {
  background: #f6f8fa;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  padding: 0.8em 1.2em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  font-size: 1em;
  color: #34495e;
  display: flex;
  align-items: center;
}
.pma-aplicacion-block .pma-answer-option:hover,
.pma-aplicacion-block .pma-answer-option input:focus + span {
  background: #eaf1f7;
  border-color: #2980b9;
}
.pma-aplicacion-block .pma-answer-option input[type="radio"] {
  margin-right: 12px;
  accent-color: #2980b9;
}
.pma-aplicacion-block .pma-slide-footer {
  margin-top: 2em;
  text-align: right;
}
.pma-aplicacion-block .pma-next-button,
.pma-aplicacion-block .pma-submit-button {
  padding: 0.7em 2em;
  font-size: 1.08em;
  border-radius: 8px;
  background: linear-gradient(90deg, #2980b9 60%, #1a3557 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
  transition: background 0.2s, box-shadow 0.2s;
}
.pma-aplicacion-block .pma-next-button[disabled],
.pma-aplicacion-block .pma-submit-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  background: #b2cbe4;
  box-shadow: none;
}

/* Eliminar estilos antiguos de bloques específicos */
.pma-instrucciones-block, .pma-test-block { all: unset; } 