/* CTM · Apariencia del Campus 0.1.0
   Capa visual: solo selectores CTM. No altera contenido, acceso ni funcionalidad. */

body.ctm-appearance-enabled .ctm-dashboard,
body.ctm-appearance-enabled .ctm-login-wrap,
body.ctm-appearance-enabled .ctm-cb-student-blocks,
body.ctm-appearance-enabled .ctm-eval-card,
body.ctm-appearance-enabled .ctm-forum-shell,
body.ctm-appearance-enabled .ctm-tl-shell,
body.ctm-appearance-enabled .ctm-video-aula-head,
body.ctm-appearance-enabled .lvv-grid,
body.ctm-appearance-enabled .lvv-card,
body.ctm-appearance-enabled .lvv-chat {
  font-family:var(--ctma-font)!important;
  color:var(--ctma-text);
}

body.ctm-appearance-enabled .ctm-dashboard,
body.ctm-appearance-enabled .ctm-forum-shell,
body.ctm-appearance-enabled .ctm-tl-shell {
  max-width:var(--ctma-content-width)!important;
}

/* CAMPUS / CORE */
body.ctm-appearance-core .ctm-card,
body.ctm-appearance-core .ctm-course-card,
body.ctm-appearance-core .ctm-outline-module {
  background:var(--ctma-card-bg);
  border-color:var(--ctma-border);
  border-radius:var(--ctma-card-radius);
  box-shadow:0 8px 30px rgba(15,23,42,var(--ctma-shadow-opacity));
}
body.ctm-appearance-core .ctm-dashboard,
body.ctm-appearance-core .ctm-login-wrap {font-size:var(--ctma-base-size);line-height:var(--ctma-base-line)}
body.ctm-appearance-core .ctm-profile-hero h1{font-size:var(--ctma-campus-title)!important}
body.ctm-appearance-core .ctm-course-card h3{font-size:var(--ctma-course-title)!important;color:var(--ctma-text)}
body.ctm-appearance-core .ctm-outline-module{background:var(--ctma-module-card-bg);border-color:var(--ctma-module-card-border)}
body.ctm-appearance-core .ctm-outline-module h3{font-size:var(--ctma-module-title)!important;color:var(--ctma-text)}
body.ctm-appearance-core .ctm-outline-module p{font-size:var(--ctma-module-desc)!important;color:var(--ctma-muted)!important;line-height:var(--ctma-base-line)}
body.ctm-appearance-core .ctm-module-number{font-size:var(--ctma-module-number-size)!important;background:var(--ctma-module-number-bg)!important;color:var(--ctma-module-number-color)!important}
body.ctm-appearance-core .ctm-status,
body.ctm-appearance-core .ctm-eval-module-state{font-size:var(--ctma-status-size)!important}
body.ctm-appearance-core .ctm-status-active,
body.ctm-appearance-core .ctm-eval-module-state.is-passed{background:var(--ctma-status-active-bg)!important;color:var(--ctma-status-active-color)!important}
body.ctm-appearance-core .ctm-eval-outline-module.is-locked{background:var(--ctma-locked-bg)!important;color:var(--ctma-locked-color)!important}
body.ctm-appearance-core .ctm-eyebrow,
body.ctm-appearance-core .ctm-field-help{color:var(--ctma-muted)}

/* CLASES / COURSE BUILDER */
body.ctm-appearance-lessons .ctm-cb-student-blocks{font-size:var(--ctma-base-size);line-height:var(--ctma-base-line);color:var(--ctma-text)}
body.ctm-appearance-lessons .ctm-cb-text{font-size:var(--ctma-lesson-body)!important;line-height:var(--ctma-lesson-line)!important;color:var(--ctma-text)}
body.ctm-appearance-lessons .ctm-cb-heading{font-size:var(--ctma-lesson-heading)!important;color:var(--ctma-lesson-heading-color)!important}
body.ctm-appearance-lessons .ctm-cb-callout{font-size:var(--ctma-callout-size)!important;border-radius:var(--ctma-card-radius);color:var(--ctma-text)}
body.ctm-appearance-lessons .ctm-cb-callout p,
body.ctm-appearance-lessons .ctm-cb-callout strong{font-size:inherit;line-height:var(--ctma-base-line)}
body.ctm-appearance-lessons .ctm-cb-lesson-nav a{font-size:var(--ctma-lesson-nav-size)!important;background:var(--ctma-lesson-nav-bg)!important;border-color:var(--ctma-lesson-nav-border)!important;border-radius:var(--ctma-btn-radius)!important;color:var(--ctma-text)!important}
body.ctm-appearance-lessons .ctm-cb-lesson-nav span{color:var(--ctma-muted)!important}
body.ctm-appearance-lessons .ctm-cb-separator{border-color:var(--ctma-border)}

/* EVALUACIONES */
body.ctm-appearance-evaluations .ctm-eval-card{border-radius:var(--ctma-card-radius);border-color:var(--ctma-border);background:var(--ctma-card-bg);box-shadow:0 8px 30px rgba(15,23,42,var(--ctma-shadow-opacity))}
body.ctm-appearance-evaluations .ctm-eval-head{background:var(--ctma-eval-header-bg)!important}
body.ctm-appearance-evaluations .ctm-eval-head h2{font-size:var(--ctma-eval-title)!important}
body.ctm-appearance-evaluations .ctm-eval-description,
body.ctm-appearance-evaluations .ctm-eval-description p{font-size:var(--ctma-eval-desc)!important}
body.ctm-appearance-evaluations .ctm-eval-question{background:var(--ctma-eval-card-bg)!important;border-color:var(--ctma-eval-card-border)!important;border-radius:var(--ctma-card-radius)!important}
body.ctm-appearance-evaluations .ctm-eval-question-head{background:var(--ctma-eval-head-bg)!important;border-color:var(--ctma-eval-card-border)!important}
body.ctm-appearance-evaluations .ctm-eval-question-prompt,
body.ctm-appearance-evaluations .ctm-eval-question legend>.ctm-eval-question-prompt{font-size:var(--ctma-eval-question)!important;color:var(--ctma-eval-question-color)!important;line-height:1.45!important}
body.ctm-appearance-evaluations .ctm-eval-option,
body.ctm-appearance-evaluations .ctm-eval-option-text,
body.ctm-appearance-evaluations .ctm-eval-option-body{font-size:var(--ctma-eval-answer)!important;color:var(--ctma-eval-answer-color)!important}
body.ctm-appearance-evaluations .ctm-eval-option{background:var(--ctma-eval-option-bg)!important;border-color:var(--ctma-eval-option-border)!important;border-radius:var(--ctma-btn-radius)!important}
body.ctm-appearance-evaluations .ctm-eval-option:has(input:checked){border-color:var(--ctma-eval-selected)!important;box-shadow:0 0 0 2px rgba(56,88,233,.12)!important}
body.ctm-appearance-evaluations .ctm-eval-question-state,
body.ctm-appearance-evaluations .ctm-eval-question-type,
body.ctm-appearance-evaluations .ctm-eval-module-state{font-size:var(--ctma-eval-status-size)!important}
body.ctm-appearance-evaluations .ctm-eval-submit,
body.ctm-appearance-evaluations .ctm-eval-secondary{background:var(--ctma-eval-button-bg)!important;color:var(--ctma-eval-button-text)!important;border-radius:var(--ctma-btn-radius)!important}
body.ctm-appearance-evaluations .ctm-eval-result{font-size:var(--ctma-eval-result-size)!important;border-radius:var(--ctma-card-radius)!important}
body.ctm-appearance-evaluations .ctm-eval-result.is-passed{background:var(--ctma-eval-pass-bg)!important}
body.ctm-appearance-evaluations .ctm-eval-result.is-failed{background:var(--ctma-eval-fail-bg)!important}
body.ctm-appearance-evaluations .ctm-eval-score-ring strong{font-size:var(--ctma-eval-score-size)!important}
body.ctm-appearance-evaluations .ctm-eval-progress-summary,
body.ctm-appearance-evaluations .ctm-eval-question-count,
body.ctm-appearance-evaluations .ctm-eval-mode-note,
body.ctm-appearance-evaluations .ctm-eval-final-blocker{border-radius:var(--ctma-btn-radius)!important}

/* LISTADO DE CLASES · “Ver clase →”
   La fila real es: número + <strong>título</strong> + <b>Ver clase →</b>.
   Usamos minmax(0,1fr) y min-width:0 para que títulos largos puedan partir línea
   sin empujar “Ver clase” fuera de la tarjeta. */
body.ctm-appearance-core.single-ctm_module a.lesson-row{
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr) max-content!important;
  gap:14px!important;
  align-items:center!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  white-space:normal!important;
  overflow:hidden!important;
}
body.ctm-appearance-core.single-ctm_module a.lesson-row > strong{
  min-width:0!important;
  max-width:100%!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  line-height:1.35!important;
}
body.ctm-appearance-core.single-ctm_module a.lesson-row > b{
  max-width:100%!important;
  justify-self:end!important;
}
@media (max-width:820px){
  body.ctm-appearance-core.single-ctm_module a.lesson-row{
    grid-template-columns:36px minmax(0,1fr)!important;
  }
  body.ctm-appearance-core.single-ctm_module a.lesson-row > b{
    grid-column:2!important;
    justify-self:start!important;
    margin-top:4px!important;
  }
}
body.ctm-appearance-core.single-ctm_module a.lesson-row > b,
body.ctm-appearance-core.single-ctm_module .lesson-row > b.ctma-view-lesson-label,
body.ctm-appearance-core.single-ctm_module a.ctma-view-lesson-link{
  font-size:var(--ctma-view-lesson-size)!important;
  color:var(--ctma-view-lesson-color)!important;
  font-weight:var(--ctma-view-lesson-weight)!important;
  text-decoration:none!important;
  white-space:nowrap!important;
  transition:color .16s ease,opacity .16s ease!important;
}
body.ctm-appearance-core.single-ctm_module a.lesson-row:hover > b,
body.ctm-appearance-core.single-ctm_module a.lesson-row:focus > b,
body.ctm-appearance-core.single-ctm_module a.lesson-row:focus-visible > b,
body.ctm-appearance-core.single-ctm_module a.ctma-view-lesson-link:hover,
body.ctm-appearance-core.single-ctm_module a.ctma-view-lesson-link:focus{
  color:var(--ctma-view-lesson-hover)!important;
  text-decoration:none!important;
}

/* BOTONES, AVISOS Y CAMPOS */
body.ctm-appearance-buttons .ctm-button,
body.ctm-appearance-buttons .ctm-eval-submit,
body.ctm-appearance-buttons .ctm-eval-secondary,
body.ctm-appearance-buttons .ctm-forum-btn,
body.ctm-appearance-buttons .lvv-btn,
body.ctm-appearance-buttons .ctm-tl-primary,
body.ctm-appearance-buttons .ctm-tl-secondary,
body.ctm-appearance-buttons .ctm-tl-request-actions button{
  font-size:var(--ctma-btn-size)!important;
  font-weight:var(--ctma-btn-weight)!important;
  border-radius:var(--ctma-btn-radius)!important;
  padding:var(--ctma-btn-py) var(--ctma-btn-px)!important;
}
body.ctm-appearance-buttons .ctm-button{background:var(--ctma-btn-bg)!important;color:var(--ctma-btn-text)!important}
body.ctm-appearance-buttons .ctm-button:hover{background:var(--ctma-btn-hover)!important}
body.ctm-appearance-buttons .ctm-alert,
body.ctm-appearance-buttons .ctm-eval-alert,
body.ctm-appearance-buttons .ctm-eval-progression-alert,
body.ctm-appearance-buttons .ctm-forum-notice,
body.ctm-appearance-buttons .ctm-tl-request-notice{font-size:var(--ctma-alert-size)!important;border-radius:var(--ctma-alert-radius)!important}
body.ctm-appearance-buttons input[type=text],
body.ctm-appearance-buttons input[type=password],
body.ctm-appearance-buttons input[type=email],
body.ctm-appearance-buttons input[type=search],
body.ctm-appearance-buttons input[type=number],
body.ctm-appearance-buttons select,
body.ctm-appearance-buttons textarea{font-size:var(--ctma-input-size)!important;border-radius:var(--ctma-input-radius)!important}

/* MULTIMEDIA */
body.ctm-appearance-media .ctm-cb-inline-media{max-width:var(--ctma-media-width)!important}

/* EVALUACIONES · tamaño independiente de imágenes.
   Esta capa prevalece sobre Pequeña/Mediana/Grande del plugin de evaluaciones
   únicamente cuando Apariencia CTM administra Evaluaciones. */
body.ctm-appearance-evaluations .ctm-eval-question-image img{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:min(100%,var(--ctma-eval-question-image-width))!important;
  margin:var(--ctma-eval-image-margin)!important;
}
body.ctm-appearance-evaluations .ctm-eval-option-image img{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:min(100%,var(--ctma-eval-option-image-width))!important;
  margin:var(--ctma-eval-image-margin)!important;
}
/* Neutraliza el width:100% de los presets internos (incluido 'Ancho completo')
   sin alterar la estructura ni la privacidad del archivo. */
body.ctm-appearance-evaluations .ctm-eval-question-image,
body.ctm-appearance-evaluations .ctm-eval-option-image{
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
body.ctm-appearance-media .ctm-cb-inline-media img,
body.ctm-appearance-media .ctm-eval-question-image img,
body.ctm-appearance-media .ctm-eval-option-image img,
body.ctm-appearance-media .ctm-mv-image img{border-radius:var(--ctma-image-radius)!important}
body.ctm-appearance-media .ctm-cb-inline-video-shell,
body.ctm-appearance-media .ctm-cb-inline-media video,
body.ctm-appearance-media .lvv-player,
body.ctm-appearance-media .lvv-video{border-radius:var(--ctma-video-radius)!important}
body.ctm-appearance-media .ctm-cb-inline-media video{max-height:var(--ctma-video-height)!important}
body.ctm-appearance-media .ctm-cb-play-icon,
body.ctm-appearance-media .lvv-play-icon{width:var(--ctma-play-size)!important;height:var(--ctma-play-size)!important}

/* BIBLIOTECA */
body.ctm-appearance-library .ctm-tl-shell{--ctm-tl-blue:var(--ctma-library-accent);font-size:var(--ctma-base-size);line-height:var(--ctma-base-line)}
body.ctm-appearance-library .ctm-tl-hero h1{font-size:var(--ctma-library-title)!important}
body.ctm-appearance-library .ctm-tl-doc h3{font-size:var(--ctma-library-card-title)!important}
body.ctm-appearance-library .ctm-tl-doc p,
body.ctm-appearance-library .ctm-tl-doc-meta,
body.ctm-appearance-library .ctm-tl-doc-foot{font-size:var(--ctma-library-body)!important}
body.ctm-appearance-library .ctm-tl-doc-actions a,
body.ctm-appearance-library .ctm-tl-primary,
body.ctm-appearance-library .ctm-tl-secondary{font-size:var(--ctma-library-button)!important}
body.ctm-appearance-library .ctm-tl-view,
body.ctm-appearance-library .ctm-tl-primary,
body.ctm-appearance-library .ctm-tl-request-actions button,
body.ctm-appearance-library .ctm-tl-hero-icon,
body.ctm-appearance-library .ctm-tl-course-icon{background:var(--ctma-library-accent)!important}
body.ctm-appearance-library .ctm-tl-doc,
body.ctm-appearance-library .ctm-tl-viewer,
body.ctm-appearance-library .ctm-tl-my-requests,
body.ctm-appearance-library .ctm-tl-request-box{border-radius:var(--ctma-card-radius)!important;box-shadow:0 8px 28px rgba(15,23,42,var(--ctma-shadow-opacity))}

/* FORO */
body.ctm-appearance-forum .ctm-forum-shell{--ctm-forum-accent:var(--ctma-forum-accent);font-size:var(--ctma-base-size);line-height:var(--ctma-base-line)}
body.ctm-appearance-forum .ctm-forum-hero h1{font-size:var(--ctma-forum-title)!important}
body.ctm-appearance-forum .ctm-forum-topic-title{font-size:var(--ctma-forum-topic)!important}
body.ctm-appearance-forum .ctm-forum-thread-question h2{font-size:var(--ctma-forum-question)!important}
body.ctm-appearance-forum .ctm-forum-thread-question .ctm-forum-content{font-size:var(--ctma-forum-body)!important;line-height:var(--ctma-lesson-line)!important}
body.ctm-appearance-forum .ctm-forum-reply .ctm-forum-content{font-size:var(--ctma-forum-reply)!important;line-height:var(--ctma-lesson-line)!important}
body.ctm-appearance-forum .ctm-forum-author span,
body.ctm-appearance-forum .ctm-forum-topic-meta span,
body.ctm-appearance-forum .ctm-forum-topic-side span,
body.ctm-appearance-forum .ctm-forum-topic-side em{font-size:var(--ctma-forum-meta)!important}
body.ctm-appearance-forum .ctm-forum-btn,
body.ctm-appearance-forum .ctm-forum-actions button{font-size:var(--ctma-forum-button)!important}
body.ctm-appearance-forum .ctm-forum-btn{background:var(--ctma-forum-accent)!important}
body.ctm-appearance-forum .ctm-forum-panel,
body.ctm-appearance-forum .ctm-forum-reply,
body.ctm-appearance-forum .ctm-forum-reply-box{border-radius:var(--ctma-card-radius)!important;box-shadow:0 8px 28px rgba(15,23,42,var(--ctma-shadow-opacity))}
body.ctm-appearance-forum .ctm-forum-editor textarea{font-size:var(--ctma-forum-body)!important}

/* VIDEO AULA */
body.ctm-appearance-video .ctm-video-aula-head h2{font-size:var(--ctma-video-title)!important}
body.ctm-appearance-video .ctm-video-campus-copy strong{font-size:var(--ctma-video-card-title)!important}
body.ctm-appearance-video .ctm-video-campus-icon{background:var(--ctma-video-accent)!important}
body.ctm-appearance-video .lvv-chat .lvv-chat-title{font-size:var(--ctma-video-chat-title)!important}
body.ctm-appearance-video .lvv-chat .lvv-comment-author,
body.ctm-appearance-video .lvv-chat .lvv-comment-body,
body.ctm-appearance-video .lvv-chat .lvv-chat-empty,
body.ctm-appearance-video .lvv-chat .lvv-chat-blocked,
body.ctm-appearance-video .lvv-chat .lvv-chat-form textarea,
body.ctm-appearance-video .lvv-chat .lvv-comment-edit-box textarea,
body.ctm-appearance-video .lvv-chat .lvv-btn{font-size:var(--ctma-video-chat)!important}
body.ctm-appearance-video .lvv-chat .lvv-chat-intro,
body.ctm-appearance-video .lvv-chat .lvv-chat-scroll-note,
body.ctm-appearance-video .lvv-chat .lvv-comment-date,
body.ctm-appearance-video .lvv-chat .lvv-comment-badge,
body.ctm-appearance-video .lvv-chat .lvv-comment-edit-feedback,
body.ctm-appearance-video .lvv-chat .lvv-chat-feedback,
body.ctm-appearance-video .lvv-chat .lvv-chat-new-count,
body.ctm-appearance-video .lvv-chat .lvv-chat-draft-state,
body.ctm-appearance-video .lvv-chat .lvv-moderator-ribbon{font-size:var(--ctma-video-chat-small)!important}
body.ctm-appearance-video .lvv-chat .lvv-chat-count,
body.ctm-appearance-video .lvv-chat .lvv-comment-action,
body.ctm-appearance-video .lvv-chat .lvv-comment-edit-save,
body.ctm-appearance-video .lvv-chat .lvv-comment-edit-cancel,
body.ctm-appearance-video .lvv-chat .lvv-chat-replying,
body.ctm-appearance-video .lvv-chat .lvv-reaction{font-size:var(--ctma-video-chat-action)!important}
body.ctm-appearance-video .lvv-btn{background:var(--ctma-video-accent)!important}

@media(max-width:700px){
  body.ctm-appearance-core .ctm-profile-hero h1{font-size:calc(var(--ctma-campus-title) * .88)!important}
  body.ctm-appearance-evaluations .ctm-eval-question-prompt,
  body.ctm-appearance-evaluations .ctm-eval-question legend>.ctm-eval-question-prompt{font-size:calc(var(--ctma-eval-question) * .94)!important}
  body.ctm-appearance-forum .ctm-forum-hero h1{font-size:calc(var(--ctma-forum-title) * .86)!important}
}

body.ctm-appearance-enabled .ctm-dashboard,body.ctm-appearance-enabled .ctm-forum-shell,body.ctm-appearance-enabled .ctm-tl-shell{background-color:var(--ctma-page-bg)}
