/**
 * InsidePiano — Mis Revisiones page
 * Scoped to .itemid-[MIS_REVISIONES_ITEMID] — update once Itemid is known
 * Component: mod_custom module rendering custom PHP via Sourcerer {source}
 */

/* ==========================================================================
   Page wrapper — strip Conca double-card
   ========================================================================== */
.demo-card:has(.ip-revisiones-page),
.demo-card:has(.ip-revisiones-page) .demo-card-body {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* ==========================================================================
   Section titles (reuse design token pattern)
   ========================================================================== */
.ip-rev-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #939397;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem 0;
  padding: 0;
}

.ip-rev-section-title i {
  font-size: 1rem;
  color: #7367f0;
}

/* ==========================================================================
   Radar Chart card
   ========================================================================== */
.ip-rev-radar-card {
  background: #1F1F21;
  border: 1px solid #2e2e33;
  border-radius: 12px;
  padding: 20px 20px 12px;
  margin-bottom: 1.5rem;
}

.ip-rev-radar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 4px;
}

.ip-rev-radar-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e0e0e5;
}

.ip-rev-radar-subtitle {
  font-size: 0.8rem;
  color: #57575a;
  margin-top: 2px;
}

/* Legend */
.ip-rev-radar-legend {
  display: flex;
  gap: 1.25rem;
  flex-shrink: 0;
}

.ip-rev-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #939397;
}

.ip-rev-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ip-rev-legend-dot--self {
  background: #7367f0;
}

.ip-rev-legend-dot--instructor {
  background: #ff9f43;
}

/* Axis progress bars below chart */
.ip-rev-axis-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #2e2e33;
}

.ip-rev-axis-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ip-rev-axis-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #939397;
  width: 90px;
  flex-shrink: 0;
}

.ip-rev-axis-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.ip-rev-axis-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #5F4AFE, #7367f0);
  transition: width 0.8s ease;
}

.ip-rev-axis-pct {
  font-size: 0.75rem;
  font-weight: 700;
  color: #7367f0;
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}

/* Empty radar state */
.ip-rev-radar-empty {
  text-align: center;
  padding: 40px 20px;
  color: #57575a;
  font-size: 0.875rem;
}

.ip-rev-radar-empty i {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #3a3a3f;
}

/* ==========================================================================
   Submission log cards (shared by Ejecuciones + Consultas)
   ========================================================================== */
.ip-rev-log-card {
  background: #1F1F21;
  border: 1px solid #2e2e33;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

/* Log card header row */
.ip-rev-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #2e2e33;
}

/* Empty state inside log card */
.ip-rev-log-empty {
  padding: 32px 20px;
  text-align: center;
  color: #57575a;
  font-size: 0.875rem;
}

.ip-rev-log-empty i {
  display: block;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: #3a3a3f;
}

/* Individual submission entry */
.ip-rev-entry {
  padding: 16px 20px;
  border-bottom: 1px solid #2e2e33;
  transition: background-color 0.15s ease;
}

.ip-rev-entry:last-child {
  border-bottom: none;
}

.ip-rev-entry:hover {
  background: rgba(255,255,255,0.02);
}

/* Entry top row: title + date + status badge */
.ip-rev-entry-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.ip-rev-entry-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e0e0e5;
  flex: 1;
  min-width: 0;
}

.ip-rev-entry-date {
  font-size: 0.775rem;
  color: #57575a;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Status badges */
.ip-rev-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.ip-rev-badge--pending {
  background: rgba(255, 159, 67, 0.12);
  color: #ff9f43;
  border: 1px solid rgba(255, 159, 67, 0.3);
}

.ip-rev-badge--done {
  background: rgba(40, 199, 111, 0.12);
  color: #28c76f;
  border: 1px solid rgba(40, 199, 111, 0.3);
}

/* Entry meta row: topic/serie, context */
.ip-rev-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 8px;
}

.ip-rev-entry-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: #939397;
}

.ip-rev-entry-meta-item i {
  font-size: 0.85rem;
  color: #57575a;
}

/* Question text (Consultas) */
.ip-rev-entry-question {
  font-size: 0.85rem;
  color: #c8c8cd;
  line-height: 1.6;
  margin-bottom: 8px;
  border-left: 2px solid #2e2e33;
  padding-left: 12px;
}

/* Context notes (Ejecuciones) */
.ip-rev-entry-notes {
  font-size: 0.825rem;
  color: #939397;
  line-height: 1.5;
  font-style: italic;
}

/* Instructor response block */
.ip-rev-response {
  margin-top: 12px;
  background: rgba(115, 103, 240, 0.06);
  border: 1px solid rgba(115, 103, 240, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
}

.ip-rev-response-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #7367f0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.ip-rev-response-header i {
  font-size: 0.9rem;
}

.ip-rev-response-text {
  font-size: 0.875rem;
  color: #c8c8cd;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* Instructor axis grades (Ejecuciones) */
.ip-rev-grades {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(115, 103, 240, 0.15);
}

.ip-rev-grade-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid #2e2e33;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.775rem;
}

.ip-rev-grade-chip-label {
  color: #939397;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ip-rev-grade-chip-value {
  color: #ff9f43;
  font-weight: 700;
}

.ip-rev-grade-letter {
  margin-left: auto;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ff9f43;
  flex-shrink: 0;
}

/* Image attachment thumbnail (Consultas) */
.ip-rev-attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: #7367f0;
  text-decoration: none;
  border: 1px solid rgba(115,103,240,0.3);
  border-radius: 6px;
  padding: 4px 10px;
  background: rgba(115,103,240,0.08);
  transition: all 0.2s ease;
}

.ip-rev-attachment:hover {
  background: rgba(115,103,240,0.18);
  color: #9f92fe;
  border-color: rgba(115,103,240,0.5);
}

.ip-rev-attachment i {
  font-size: 0.9rem;
}

/* "Solicitar revisión" CTA link at bottom of log (Ejecuciones) */
.ip-rev-cta-row {
  padding: 12px 20px;
  border-top: 1px solid #2e2e33;
  display: flex;
  justify-content: flex-end;
}

.ip-rev-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: #7367f0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ip-rev-cta-link:hover {
  color: #9f92fe;
}

.ip-rev-cta-link i {
  font-size: 1rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 640px) {
  .ip-rev-axis-bars {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ip-rev-entry-top {
    flex-wrap: wrap;
    gap: 8px;
  }

  .ip-rev-radar-legend {
    flex-direction: column;
    gap: 0.5rem;
  }

  .ip-rev-radar-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .ip-rev-grades {
    gap: 6px;
  }
}
