@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/PlusJakartaSans-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/PlusJakartaSans-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

/*
 * 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.
 */
.field_with_errors label,
.field_with_errors input {
  color: rgb(255 0 0 / var(--tw-text-opacity, 1)) !important;
}

.field_with_errors input,
.field_with_errors select {
  border-color: rgb(255 0 0 / var(--tw-border-opacity, 1)) !important;
}

.required::after {
  content: " *";
  color: rgb(255 0 0 / var(--tw-text-opacity, 1));
}

select.appearance-none {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239CA3AF'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
}

/* Custom styling for the search input clear button to match the search icon */
.search-cancel-custom::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
  width: 20px;
  position: relative;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232563EB' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 18L18 6M6 6l12 12' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.search-cancel-custom::-webkit-search-cancel-button:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231D4ED8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 18L18 6M6 6l12 12' /%3E%3C/svg%3E");
}

.onesignal-customlink-explanation.state-unsubscribed {
  color: red !important;
}

.onesignal-customlink-explanation.state-subscribed {
  visibility: hidden !important;
}

/* OneSignal custom link button styling - ensures consistent appearance */
.onesignal-customlink-container {
  margin: 10px 0;
}

.onesignal-customlink-subscribe {
  display: inline-block !important;
  padding: 10px 20px !important;
  margin: 10px 0 !important;
  border: none !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  text-align: center !important;
  text-decoration: none !important;
  transition:
    background-color 0.2s ease,
    opacity 0.2s ease !important;
}

.onesignal-customlink-subscribe:hover {
  opacity: 0.9 !important;
}

/* Admin nav dropdown */
.admin-nav-menu {
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 0.25rem;
  max-height: min(24rem, calc(100vh - 2rem));
  padding: 0.375rem;
}

.admin-nav-menu .admin-nav-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.625rem;
  border-radius: 0.75rem;
}

.admin-nav-menu .admin-nav-link:hover {
  background-color: rgb(249 250 251);
}

/* Create menu dropdown */
.create-menu-dropdown--expanded {
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 0.5rem;
  max-height: min(24rem, calc(100vh - 2rem));
}

.create-menu-dropdown--collapsed {
  bottom: 0;
  left: 100%;
  right: auto;
  width: 18rem;
  min-width: 18rem;
  margin-left: 0.5rem;
  max-height: min(70vh, calc(100vh - 2rem));
  overflow-y: auto;
}

/* Nav rail collapsed state
 *
 * Visibility and width are CSS-driven from html.rail-collapsed so Turbo morph
 * (e.g. failed sign-in re-render) cannot leave labels visible in a narrow rail.
 */
@media (min-width: 768px) {
  html.rail-collapsed .rail-collapse-chevron {
    transform: rotate(180deg);
  }

  html.rail-collapsed aside[data-sidebar-target="sidebar"] {
    width: 5.125rem;
    align-items: center;
    overflow: visible;
  }

  html.rail-collapsed aside[data-sidebar-target="sidebar"] nav > a,
  html.rail-collapsed aside[data-sidebar-target="sidebar"] nav .admin-nav-trigger {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 14px;
    margin-inline: auto;
  }

  html.rail-collapsed aside[data-sidebar-target="sidebar"] .rail-header {
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    padding-inline: 0.75rem;
  }

  html.rail-collapsed aside[data-sidebar-target="sidebar"] nav {
    overflow: visible;
  }

  html.rail-collapsed [data-sidebar-target="navLabel"],
  html.rail-collapsed [data-sidebar-target="navBadge"],
  html.rail-collapsed [data-sidebar-target="expandedSection"] {
    display: none !important;
  }

  html.rail-collapsed [data-sidebar-target="collapsedFooter"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 1.25rem;
    overflow: visible;
  }

  html.rail-collapsed .rail-collapsed-footer-btn {
    flex-shrink: 0;
    margin-inline: auto;
  }

  html.rail-collapsed [data-sidebar-target="main"] {
    margin-left: 5.125rem;
  }

  html.rail-collapsed [data-sidebar-target="railOffset"] {
    left: 5.125rem;
  }

  html.rail-collapsed .admin-nav-menu {
    left: 100%;
    right: auto;
    top: auto;
    bottom: 0;
    width: 15rem;
    min-width: 15rem;
    margin-top: 0;
    margin-left: 0.5rem;
    max-height: min(70vh, calc(100vh - 2rem));
  }
}

.presence-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  border: 2px solid white;
  z-index: 20;
}

/* Upper-right avatar placement (~2 o'clock) — center on rim, half in / half out */
.presence-dot--top {
  bottom: auto;
  right: auto;
  top: 23%;
  left: 93.5%;
  transform: translate(-50%, -50%);
}

.user-badge {
  z-index: 10;
}

/* Floating chat box expanded height — taller default, capped by viewport */
.chat-box-expanded {
  height: min(560px, calc(100vh - 10rem));
}

/* Video.js Custom Styling */
.video-js {
  font-family: "Plus Jakarta Sans", sans-serif;
}

.video-js .vjs-big-play-button {
  background-color: rgba(100, 102, 241, 0.8); /* Blurple-ish */
  border: none;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  line-height: 80px;
  margin-top: -40px;
  margin-left: -40px;
  transition: all 0.3s ease;
}

.video-js:hover .vjs-big-play-button {
  background-color: #6466f1;
  transform: scale(1.1);
}

.video-js .vjs-control-bar {
  background-color: rgba(24, 24, 27, 0.9);
  height: 60px;
}

.video-js .vjs-play-progress,
.video-js .vjs-volume-level {
  background-color: #6466f1;
}

.video-js .vjs-load-progress {
  background-color: rgba(255, 255, 255, 0.2);
}

.video-js .vjs-slider {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Validation error and warning message formatting matching Course and Group forms */
label.message {
  display: block !important;
  margin-top: 0.375rem !important; /* mt-1.5 */
  font-size: 0.75rem !important; /* text-xs */
  font-weight: 600 !important; /* font-semibold */
  color: #dc2626 !important; /* text-red-600 */
}

/* Retain perfect horizontal alignment for input groups (e.g., Marketing URL) while stacking error messages below */
.flex > .field_with_errors {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0% !important;
  min-width: 0px !important;
}

