/*
 * 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.
 *
 * Note: Tailwind CSS is loaded separately via stylesheet_link_tag "tailwind" in layouts
 */

/* Global styles */
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
a.cursor-pointer,
.cursor-pointer {
  cursor: pointer;
}

button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled {
  cursor: not-allowed;
}

/* Public layouts often use light body text on dark backgrounds. Form *fields*
   must not inherit that color when they render on white/default backgrounds.

   This rule is intentionally NOT wrapped in `@layer`: it must beat Tailwind's
   layered utilities/preflight so text inputs always render readable dark text on
   white. Button-like and toggle inputs are excluded via `:not()` so that styled
   controls keep their utilities — e.g. `f.submit`/`submit_tag` render as
   `input[type=submit]`, and we must not force `bg-blue-600`/`bg-slate-700`
   buttons to white. */
input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
textarea,
select {
  background-color: #ffffff;
  color: oklch(0.21 0.034 264.665);
}

input::placeholder,
textarea::placeholder {
  color: oklch(0.446 0.03 256.802);
}

.event-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-left: 1.5rem;
}

.event-timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 1.7rem;
  width: 2px;
  background: linear-gradient(180deg, #e5e7eb 0%, #cbd5f5 100%);
}

.event-timeline__item {
  display: flex;
  gap: 1rem;
  margin-top: 0;
  position: relative;
}

.event-timeline__gap {
  display: flex;
  align-items: center;
  min-height: 1.25rem;
  height: calc(1.25rem + var(--gap-minutes, 0) * 0.45px);
  padding-left: 4.35rem;
}

.event-timeline__gap span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 0.28rem 0.55rem;
  text-transform: uppercase;
}

.event-timeline__icon {
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: #eef2ff;
  border: 2px solid #c7d2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.15);
}

.event-timeline__content {
  background: #f9fafb;
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #edf2f7;
  width: 100%;
  min-width: 0;
}

.event-timeline__time {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4c1d95;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.event-timeline__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  margin-top: 0.1rem;
}

.event-timeline__description {
  font-size: 0.9rem;
  color: #4b5563;
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* Clamp text to two lines with ellipsis */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tryb pełnoekranowy edytora planu sali */
.sp-editor-fullscreen {
  background: #f8fafc;
  overflow: auto;
  padding: 16px;
}

.sp-editor-fullscreen > div:not(#stas-onboarding-widget) {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sp-editor-fullscreen > #stas-onboarding-widget {
  position: fixed;
  z-index: 90;
}

.sp-editor-fullscreen > #stas-onboarding-widget [data-stas-onboarding-target="launcher"],
.sp-editor-fullscreen > #stas-onboarding-widget [data-stas-onboarding-target="panel"] {
  left: auto !important;
  right: 1.25rem;
}

.sp-editor-fullscreen [data-seating-plan-editor-target="workspace"] {
  flex: 1 1 auto;
  min-height: 0;
}

.sp-editor-fullscreen [data-seating-plan-editor-target="canvasContainer"] {
  height: 100% !important;
  max-height: none !important;
}

/* YouTube Player iframe styles */
#youtube-player {
  position: relative;
  width: 100%;
  height: 100%;
}

#youtube-player iframe {
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  top: 0;
  left: 0;
}

@keyframes stas-onboarding-pulse {
  0%, 100% { outline-color: rgb(79, 70, 229); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.55); }
  50% { outline-color: rgb(139, 92, 246); box-shadow: 0 0 0 10px rgba(79, 70, 229, 0); }
}

.stas-onboarding-pulse {
  transition: none !important;
  animation: stas-onboarding-pulse 1.2s ease-in-out infinite;
  outline: 3px solid rgb(79, 70, 229);
  outline-offset: 4px;
  border-radius: 0.75rem;
  position: relative;
  z-index: 30;
  scroll-margin-bottom: 22rem;
}

html.stas-onboarding-panel-open body {
  padding-bottom: 22rem;
}

.dashboard-tile {
  position: relative;
  min-width: 0;
}

/* The shell is the grid item, so the link is no longer blockified by the grid.
   An inline link splits its background around the inner flex row. */
.dashboard-tile > :first-child {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#dashboard-tiles[data-dashboard-tab="favorites"] #dashboard-tiles-grid > :not([data-favorite="true"]) {
  display: none;
}

/* Sits in the empty top-right corner above the chevron, so the tile keeps its size. */
.dashboard-tile-star {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: rgb(156, 163, 175);
  cursor: pointer;
  transition: opacity 120ms ease, color 120ms ease, transform 120ms ease;
}

.dashboard-tile-star svg {
  width: 0.875rem;
  height: 0.875rem;
}

.dashboard-tile-star:hover {
  color: rgb(75, 85, 99);
}

.dashboard-tile-star:active {
  transform: scale(0.88);
}

.dashboard-tile-star:focus-visible {
  outline: 2px solid rgb(251, 191, 36);
  outline-offset: 1px;
}

.dashboard-tile-star[aria-pressed="true"] {
  color: rgb(245, 158, 11);
}

.dashboard-tile-star[aria-pressed="true"] svg {
  fill: currentColor;
  stroke: currentColor;
}

.dashboard-favorite-toggle[aria-pressed="true"] {
  color: rgb(217, 119, 6);
  border-color: rgb(253, 230, 138);
  background: rgb(255, 251, 235);
}

.dashboard-favorite-toggle[aria-pressed="true"] svg {
  fill: currentColor;
  stroke: currentColor;
}

.dashboard-tiles-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.dashboard-tiles-header-spacer {
  display: none;
}

.dashboard-tiles-header-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.dashboard-tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 9999px;
  background: rgb(229, 231, 235);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.dashboard-tile-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.dashboard-tile-tab-icon {
  width: 1rem;
  height: 1rem;
  color: rgb(245, 158, 11);
}

.dashboard-tile-tab[aria-selected="true"] {
  background: white;
  color: rgb(17, 24, 39);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12), 0 1px 2px rgba(15, 23, 42, 0.06);
}

.dashboard-tile-tab[aria-selected="true"] .dashboard-tile-tab-icon {
  fill: currentColor;
}

.dashboard-tile-tab[aria-selected="false"] {
  color: rgb(75, 85, 99);
}

.dashboard-tile-tab[aria-selected="false"]:hover {
  color: rgb(17, 24, 39);
}

.dashboard-tile-tab:focus-visible {
  outline: 2px solid rgb(59, 130, 246);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .dashboard-tiles-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .dashboard-tiles-header-spacer {
    display: block;
  }
}

.dashboard-tiles-edit {
  display: none;
}

/* Reveal-on-hover only where a mouse can hover; touch tablets use the Edytuj mode like phones. */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .dashboard-tile-star[aria-pressed="false"] {
    opacity: 0;
  }

  .dashboard-tile:hover .dashboard-tile-star[aria-pressed="false"],
  .dashboard-tile-star:focus-visible {
    opacity: 1;
  }
}

@media (max-width: 767px) {
  .dashboard-tile-tab {
    padding: 0 1rem;
  }
}

@media (max-width: 767px), (hover: none), (pointer: coarse) {
  .dashboard-tiles-edit {
    display: inline-flex;
  }

  .dashboard-tile-star {
    opacity: 0;
    pointer-events: none;
  }

  [data-editing="true"] .dashboard-tile-star {
    opacity: 1;
    pointer-events: auto;
  }

  [data-editing="true"] .dashboard-tile {
    border-radius: 0.75rem;
    box-shadow: 0 0 0 2px rgb(253, 230, 138);
  }
}

