/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* TinyMCE Answer Option Editor Styles - Compact Toolbar */
.tox-tinymce.option-editor-compact .tox-toolbar__primary {
  padding: 2px 4px !important;
  min-height: 28px !important;
}

.tox-tinymce.option-editor-compact .tox-tbtn {
  height: 26px !important;
  width: 26px !important;
  margin: 1px !important;
  padding: 3px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.tox-tinymce.option-editor-compact .tox-tbtn__select-label,
.tox-tinymce.option-editor-compact .tox-tbtn > span {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
}

.tox-tinymce.option-editor-compact .tox-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
}

.tox-tinymce.option-editor-compact .tox-tbtn svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}

.tox-tinymce.option-editor-compact .tox-edit-area {
  padding: 2px !important;
}

.tox-tinymce.option-editor-compact .tox-edit-area__iframe {
  min-height: 28px !important;
}

/* TinyMCE Content Display Styles */
.tinymce-content {
  line-height: 1.6 !important;
}

/* Inline TinyMCE content (for answer options) */
.tinymce-content.inline p {
  display: inline !important;
  margin: 0 !important;
}

.tinymce-content.inline p + p {
  margin-left: 0.5em !important;
}

.tinymce-content h1 {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  margin-bottom: 1rem !important;
  margin-top: 1.5rem !important;
  color: #111827 !important;
}

.tinymce-content h1:first-child {
  margin-top: 0 !important;
}

.tinymce-content h2 {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.75rem !important;
  margin-top: 1.25rem !important;
  color: #111827 !important;
}

.tinymce-content h2:first-child {
  margin-top: 0 !important;
}

.tinymce-content h3 {
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.5rem !important;
  margin-top: 1rem !important;
  color: #111827 !important;
}

.tinymce-content h3:first-child {
  margin-top: 0 !important;
}

.tinymce-content p {
  margin-bottom: 1rem !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
}

.tinymce-content p:last-child {
  margin-bottom: 0 !important;
}

.tinymce-content ul, .tinymce-content ol {
  margin-bottom: 1rem !important;
  padding-left: 1.5rem !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
}

.tinymce-content li {
  margin-bottom: 0.25rem !important;
}

.tinymce-content strong {
  font-weight: 600 !important;
}

.tinymce-content em {
  font-style: italic !important;
}

.tinymce-content u {
  text-decoration: underline !important;
}

.tinymce-content a {
  color: #6366f1 !important;
  text-decoration: underline !important;
}

.tinymce-content a:hover {
  color: #4f46e5 !important;
}

.tinymce-content img {
  max-width: 100% !important;
  height: auto !important;
  margin: 1rem 0 !important;
  border-radius: 0.375rem !important;
  display: block !important;
}

.tinymce-content blockquote {
  border-left: 4px solid #6366f1 !important;
  padding-left: 1rem !important;
  margin: 1rem 0 !important;
  color: #6b7280 !important;
  font-style: italic !important;
}

.tinymce-content table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1rem 0 !important;
}

.tinymce-content th,
.tinymce-content td {
  border: 1px solid #e5e7eb !important;
  padding: 0.5rem !important;
  text-align: left !important;
}

.tinymce-content th {
  background-color: #f9fafb !important;
  font-weight: 600 !important;
}

.tinymce-content iframe {
  max-width: 100% !important;
  height: auto !important;
  margin: 1rem 0 !important;
  border-radius: 0.375rem !important;
  aspect-ratio: 16 / 9 !important;
}

/* Responsive YouTube embeds */
.tinymce-content .video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin: 1rem 0;
}

.tinymce-content .video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}
