/* =================================================================
   UI SYSTEM - CORE STYLES
   =================================================================

   Design System Architecture:
   1. Tokens (variables, colors, spacing) → ui/tokens.css
   2. Elements (buttons, inputs, badges) → ui/elements/*.css
   3. Patterns (cards, forms, layouts) → composed from tokens + elements

   This file contains ONLY documentation page styling.
   Reusable components are in modular CSS files under ui/
   ================================================================= */

/* Import design tokens (CSS variables) */
@import url('./tokens.css');

/* Import element components */
@import url('./typography.css');
@import url('./button.css');
@import url('./badge.css');
@import url('./form-field.css');
@import url('./form-layout.css');
@import url('./input.css');
@import url('./select.css');
@import url('./textarea.css');
@import url('./checkbox.css');
@import url('./radio.css');
@import url('./toggle.css');
@import url('./form-actions.css');
@import url('./form-card.css');

/* Import view patterns */
@import url('./dashboard-tile.css');
@import url('./action-tile-compact.css');
@import url('./actions-navigation-grid.css');
@import url('./breadcrumb.css');
@import url('./entity-header.css');
@import url('./table-switch-buttons.css');
@import url('./modal.css');
@import url('./offer-card.css');
@import url('./footer-public.css');
@import url('./sidebar-app.css');
@import url('./content-container-app.css');
@import url('./welcome-section.css');
@import url('./user-signin-section.css');
@import url('./navbar.css');
@import url('./cta-ready-escape.css');
@import url('./review-card.css');
@import url('./experience-card.css');
@import url('./reviews-section.css');
@import url('./why-choose-us-section.css');
@import url('./book-your-experience.css');

/* Import site templates */
@import url('./app-shell-forms.css');
@import url('./app-shell-signed-in.css');

/* -------- BASE PAGE STYLING (UI DOCS ONLY) -------- */

.ui-page {
  min-height: 100vh;
  padding: 2rem 1rem;
  background-color: #fafaf9;
}

.ui-page.dark {
  background-color: #0c0a09;
}

.ui-container {
  max-width: 80rem;
  margin: 0 auto;
}

.ui-header {
  margin-bottom: 3rem;
}

.ui-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 2.5rem;
  font-family: 'Playfair Display', serif;
  color: #1c1917;
  margin-bottom: 0.5rem;
}

.ui-page.dark .ui-header h1 {
  color: #fafaf9;
}

.ui-description {
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: #78716c;
  max-width: 40rem;
  margin-bottom: 1rem;
}

.ui-page.dark .ui-description {
  color: #d6d3d1;
}

/* -------- SECTION STYLING -------- */

.ui-section {
  margin-bottom: 3rem;
}

.ui-section-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 2rem;
  color: #1c1917;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e7e5e4;
}

.ui-page.dark .ui-section-title {
  color: #fafaf9;
  border-bottom-color: #44403c;
}

/* -------- COMPONENT VARIANTS -------- */

.ui-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ui-variant-tag {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background-color: #e7e5e4;
  color: #44403c;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.ui-page.dark .ui-variant-tag {
  background-color: #44403c;
  color: #d6d3d1;
}

/* -------- PREVIEW BLOCKS -------- */

.ui-preview-block {
  margin-bottom: 2rem;
  border: 1px solid #e7e5e4;
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: white;
}

.ui-page.dark .ui-preview-block {
  background-color: #292524;
  border-color: #44403c;
}

.ui-preview-label {
  display: block;
  padding: 0.5rem 1rem;
  background-color: #f5f5f4;
  color: #78716c;
  font-size: 0.875rem;
  font-weight: 500;
  border-bottom: 1px solid #e7e5e4;
}

.ui-page.dark .ui-preview-label {
  background-color: #44403c;
  color: #d6d3d1;
  border-bottom-color: #57534e;
}

.ui-preview-content {
  padding: 2rem;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.ui-page.dark .ui-preview-content {
  background-color: #1c1917;
}

/* -------- CONTEXT-SPECIFIC PREVIEW BACKGROUNDS -------- */

/* Standard Context: Shows normal page background */
.ui-preview-standard-context {
  background-color: var(--color-bg-primary) !important;
}

/* Glassy Context: Shows dark overlay/hero background with image + glassy panel */
.ui-preview-glassy-context {
  position: relative;
  background-image: url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Dark overlay over the background image */
.ui-preview-glassy-context::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10, 10, 10, 0.85),
    rgba(10, 10, 10, 0.7),
    rgba(10, 10, 10, 0.5)
  );
  z-index: 1;
}

/* Glassy panel effect inside the preview */
.ui-preview-glassy-context > * {
  position: relative;
  z-index: 2;
}

/* Glassy panel container (floats over the background) */
.ui-glassy-panel {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.dark .ui-glassy-panel {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.15);
}

/* In dark theme, adjust contexts to maintain visual distinction */
.ui-page.dark .ui-preview-standard-context {
  background-color: var(--color-bg-secondary) !important;
}

.ui-page.dark .ui-preview-glassy-context {
  background-image: url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* -------- CODE SNIPPET BLOCKS -------- */

.ui-snippet-block {
  position: relative;
  margin-bottom: 2rem;
  background-color: white;
  border: 1px solid #e7e5e4;
  border-radius: 0.75rem;
  overflow: hidden;
}

.ui-page.dark .ui-snippet-block {
  background-color: #292524;
  border-color: #44403c;
}

.ui-snippet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: #f5f5f4;
  border-bottom: 1px solid #e7e5e4;
}

.ui-page.dark .ui-snippet-header {
  background-color: #44403c;
  border-bottom-color: #57534e;
}

.ui-snippet-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #78716c;
}

.ui-page.dark .ui-snippet-label {
  color: #d6d3d1;
}

.ui-copy-btn {
  padding: 0.375rem 0.75rem;
  background-color: #22c55e;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.ui-copy-btn:hover {
  background-color: #16a34a;
}

.ui-copy-btn:active {
  background-color: #15803d;
}

.ui-copy-btn.copied {
  background-color: #0ea5e9;
}

pre {
  margin: 0;
  padding: 1rem;
  background-color: #1c1917;
  color: #d6d3d1;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.5rem;
}

code {
  color: inherit;
  font-family: inherit;
}

/* -------- NOTES SECTION -------- */

.ui-notes {
  padding: 1.5rem;
  background-color: #f5f5f4;
  border-radius: 0.75rem;
  margin-top: 1.5rem;
}

.ui-page.dark .ui-notes {
  background-color: #44403c;
}

.ui-notes-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1c1917;
  margin-bottom: 0.75rem;
}

.ui-page.dark .ui-notes-title {
  color: #fafaf9;
}

.ui-notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ui-note-item {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #44403c;
}

.ui-page.dark .ui-note-item {
  color: #d6d3d1;
}

.ui-note-do {
  color: #166534;
  font-weight: 500;
}

.ui-page.dark .ui-note-do {
  color: #86efac;
}

.ui-note-dont {
  color: #92400e;
  font-weight: 500;
}

.ui-page.dark .ui-note-dont {
  color: #fcd34d;
}

/* -------- TYPOGRAPHY SHOWCASE -------- */

.ui-font-scale-group {
  margin-bottom: 2rem;
}

.ui-font-scale-item {
  padding: 1rem;
  border-left: 4px solid #22c55e;
  background-color: #f5f5f4;
  margin-bottom: 1rem;
  border-radius: 0.375rem;
}

.ui-page.dark .ui-font-scale-item {
  background-color: #44403c;
  border-left-color: #86efac;
}

.ui-font-scale-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #78716c;
  margin-bottom: 0.5rem;
}

.ui-page.dark .ui-font-scale-label {
  color: #a8a29e;
}

/* -------- COLOR PALETTE -------- */

.ui-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.ui-color-swatch {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ui-color-sample {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ui-color-info {
  padding: 0.75rem;
  background-color: white;
  font-size: 0.75rem;
}

.ui-page.dark .ui-color-info {
  background-color: #292524;
}

.ui-color-name {
  font-weight: 600;
  color: #1c1917;
  display: block;
}

.ui-page.dark .ui-color-name {
  color: #fafaf9;
}

.ui-color-code {
  color: #78716c;
  font-family: monospace;
  display: block;
  font-size: 0.7rem;
}

.ui-page.dark .ui-color-code {
  color: #a8a29e;
}

/* -------- METADATA COMMENT (AI-READABLE) -------- */

.ui-metadata {
  display: none;
}

/* -------- DARK MODE TOGGLE -------- */

.ui-theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  padding: 0.75rem;
  background-color: white;
  border: 1px solid #e7e5e4;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: all 0.2s ease;
}

.ui-page.dark .ui-theme-toggle {
  background-color: #292524;
  border-color: #44403c;
}

.ui-theme-toggle:hover {
  background-color: #f5f5f4;
}

.ui-page.dark .ui-theme-toggle:hover {
  background-color: #44403c;
}

/* -------- UTILITIES -------- */

.ui-mt-4 {
  margin-top: 1rem;
}
.ui-mb-4 {
  margin-bottom: 1rem;
}
.ui-mt-8 {
  margin-top: 2rem;
}
.ui-mb-8 {
  margin-bottom: 2rem;
}

.ui-flex {
  display: flex;
}
.ui-gap-4 {
  gap: 1rem;
}
.ui-gap-8 {
  gap: 2rem;
}
.ui-flex-wrap {
  flex-wrap: wrap;
}
.ui-items-center {
  align-items: center;
}
.ui-justify-center {
  justify-content: center;
}

.ui-text-center {
  text-align: center;
}
.ui-text-sm {
  font-size: 0.875rem;
}
.ui-text-md {
  font-size: 1rem;
}
.ui-font-bold {
  font-weight: 700;
}
.ui-font-semibold {
  font-weight: 600;
}
.ui-font-medium {
  font-weight: 500;
}

.ui-text-neutral-600 {
  color: #57534e;
}
.ui-page.dark .ui-text-neutral-600 {
  color: #a8a29e;
}

.ui-text-neutral-900 {
  color: #1c1917;
}
.ui-page.dark .ui-text-neutral-900 {
  color: #fafaf9;
}

.ui-bg-neutral-50 {
  background-color: #fafaf9;
}
.ui-page.dark .ui-bg-neutral-50 {
  background-color: #44403c;
}

/* -------- RESPONSIVE -------- */

@media (max-width: 768px) {
  .ui-page {
    padding: 1rem 0.5rem;
  }

  .ui-header h1 {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }

  .ui-preview-content {
    padding: 1rem;
  }

  pre {
    font-size: 0.75rem;
  }

  .ui-color-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}
