/* Boom PMS User Guide Template Styles */

:root {
  --color-primary: #7c3aed;
  --color-primary-dark: #6d28d9;
  --color-primary-light: #a78bfa;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #3b82f6;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--color-gray-800);
  background-color: var(--color-gray-50);
}

/* Header Styles */
.guide-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem 1rem;
}

.guide-header-content {
  max-width: 1200px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.breadcrumb a {
  color: white;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.guide-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.guide-description {
  font-size: 1.125rem;
  opacity: 0.9;
}

.guide-meta {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  opacity: 0.8;
}

.guide-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* Main Content */
.guide-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .guide-container {
    grid-template-columns: 1fr;
  }
  .guide-sidebar {
    display: none;
  }
}

.guide-content {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Hero Screenshot */
.hero-screenshot {
  margin: 1.5rem 0;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--color-gray-200);
}

.hero-screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-caption {
  background: var(--color-gray-100);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--color-gray-600);
  text-align: center;
}

/* Section Styles */
.guide-section {
  margin: 2rem 0;
}

.guide-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary-light);
}

.guide-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-gray-800);
  margin: 1.5rem 0 0.75rem;
}

/* Steps */
.steps-container {
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 2rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

.step-title {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--color-gray-900);
  margin-bottom: 0.5rem;
}

.step-content {
  color: var(--color-gray-700);
}

.step-screenshot {
  margin-top: 1rem;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--color-gray-200);
}

.step-screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

/* Tips */
.tip-box {
  background: #ecfdf5;
  border-left: 4px solid var(--color-success);
  padding: 1rem 1.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin: 1.5rem 0;
}

.tip-box.warning {
  background: #fffbeb;
  border-left-color: var(--color-warning);
}

.tip-box.info {
  background: #eff6ff;
  border-left-color: var(--color-info);
}

.tip-box.danger {
  background: #fef2f2;
  border-left-color: var(--color-danger);
}

.tip-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tip-content {
  font-size: 0.9375rem;
  color: var(--color-gray-700);
}

/* Field Reference Table */
.field-reference {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.field-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.field-table th,
.field-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-gray-200);
}

.field-table th {
  background: var(--color-gray-100);
  font-weight: 600;
  color: var(--color-gray-700);
}

.field-table tr:hover {
  background: var(--color-gray-50);
}

.field-required {
  color: var(--color-danger);
  font-weight: 600;
}

/* Collapsible Sections */
.collapsible {
  border: 1px solid var(--color-gray-200);
  border-radius: 0.5rem;
  margin: 1rem 0;
}

.collapsible-header {
  padding: 1rem 1.25rem;
  background: var(--color-gray-50);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.collapsible-header:hover {
  background: var(--color-gray-100);
}

.collapsible-content {
  padding: 1.25rem;
  display: none;
}

.collapsible.open .collapsible-content {
  display: block;
}

.collapsible-icon {
  transition: transform 0.2s;
}

.collapsible.open .collapsible-icon {
  transform: rotate(180deg);
}

/* Sidebar */
.guide-sidebar {
  position: sticky;
  top: 1rem;
  height: fit-content;
}

.sidebar-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.sidebar-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.toc-list {
  list-style: none;
}

.toc-list li {
  margin-bottom: 0.5rem;
}

.toc-list a {
  color: var(--color-gray-600);
  text-decoration: none;
  font-size: 0.875rem;
  display: block;
  padding: 0.25rem 0;
}

.toc-list a:hover {
  color: var(--color-primary);
}

.toc-list a.active {
  color: var(--color-primary);
  font-weight: 500;
}

/* Related Guides */
.related-list {
  list-style: none;
}

.related-list li {
  margin-bottom: 0.75rem;
}

.related-list a {
  color: var(--color-gray-700);
  text-decoration: none;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.related-list a:hover {
  color: var(--color-primary);
}

/* Navigation */
.guide-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-gray-200);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-gray-600);
  font-size: 0.9375rem;
}

.nav-link:hover {
  color: var(--color-primary);
}

.nav-link-label {
  font-size: 0.75rem;
  color: var(--color-gray-400);
  display: block;
}

.nav-link-title {
  font-weight: 500;
}

/* Footer */
.guide-footer {
  background: var(--color-gray-900);
  color: white;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--color-gray-400);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: white;
}

/* Language Selector */
.lang-selector {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 100;
}

#language-selector {
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 4L6 8L10 4' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  min-width: 140px;
}

#language-selector:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

#language-selector:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
  border-color: white;
}

#language-selector option {
  background: #374151;
  color: white;
  padding: 0.5rem 1rem;
}

/* Mobile Language Button */
.mobile-lang-button {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-lang-button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.mobile-lang-button .lang-code {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .guide-header-content {
    position: relative;
    padding-top: 3.5rem;
  }

  .lang-selector {
    top: 0.75rem;
    right: 0.75rem;
  }

  #language-selector {
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    font-size: 0.875rem;
    min-width: 120px;
  }

  .guide-title {
    font-size: 1.5rem;
  }

  .guide-description {
    font-size: 1rem;
  }

  .guide-meta {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .guide-content {
    padding: 1.5rem 1rem;
  }

  .step {
    padding-left: 3rem;
  }

  .step::before {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
  }

  .guide-nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 1rem;
    background: var(--color-gray-50);
    border-radius: 0.5rem;
  }
}

@media (max-width: 480px) {
  .guide-header {
    padding: 1.5rem 0.75rem;
  }

  .breadcrumb {
    font-size: 0.75rem;
    flex-wrap: wrap;
  }

  .guide-title {
    font-size: 1.25rem;
  }

  .guide-description {
    font-size: 0.875rem;
  }

  .guide-meta-item {
    font-size: 0.75rem;
  }

  .role-badges {
    gap: 0.375rem;
  }

  .role-badge {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
  }

  #language-selector {
    min-width: 100px;
    font-size: 0.75rem;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Utility Classes */
.text-muted {
  color: var(--color-gray-500);
}

.text-small {
  font-size: 0.875rem;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   ROLE BADGES
   ============================================ */
.role-badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.role-new-user {
  background: #dbeafe;
  color: #1e40af;
}

.role-manager {
  background: #fef3c7;
  color: #92400e;
}

.role-owner {
  background: #d1fae5;
  color: #065f46;
}

.role-admin {
  background: #fee2e2;
  color: #991b1b;
}

/* ============================================
   NAVIGATION PATH
   ============================================ */
.nav-path {
  background: linear-gradient(135deg, var(--color-gray-100) 0%, var(--color-gray-50) 100%);
  border: 1px solid var(--color-gray-200);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.nav-path-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.nav-path-row:last-child {
  margin-bottom: 0;
}

.nav-path-label {
  font-weight: 600;
  color: var(--color-gray-800);
  min-width: 100px;
}

.nav-path-value {
  font-family: 'SF Mono', Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 0.875rem;
  color: var(--color-primary);
}

.nav-path-arrow {
  color: var(--color-gray-400);
  margin: 0 0.25rem;
}

/* ============================================
   READING PROGRESS BAR
   ============================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-gray-200);
  z-index: 1001;
}

.reading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, #f97316 100%);
  width: 0%;
  transition: width 100ms ease-out;
}

/* ============================================
   LIGHTBOX / IMAGE MODAL
   ============================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.lightbox img {
  max-width: 95%;
  max-height: 95%;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   QUICK ACTION CARDS
   ============================================ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem;
  background: linear-gradient(135deg, white 0%, var(--color-gray-50) 100%);
  border: 2px solid var(--color-gray-200);
  border-radius: 0.75rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.quick-action-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.quick-action-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.quick-action-label {
  font-weight: 600;
  color: var(--color-gray-800);
  margin-bottom: 0.25rem;
}

.quick-action-time {
  font-size: 0.75rem;
  color: var(--color-gray-500);
}

/* ============================================
   FEEDBACK SECTION
   ============================================ */
.feedback-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  background: var(--color-gray-50);
  border-radius: 0.75rem;
  text-align: center;
  margin-top: 2rem;
}

.feedback-section p {
  margin-bottom: 1rem;
  color: var(--color-gray-800);
  font-weight: 500;
}

.feedback-buttons {
  display: flex;
  gap: 0.75rem;
}

.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: white;
  border: 2px solid var(--color-gray-200);
  border-radius: 9999px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.feedback-btn:hover {
  border-color: var(--color-primary);
  background: #f5f3ff;
}

.feedback-btn.selected {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: white;
}

.feedback-thanks {
  display: none;
  color: var(--color-success);
  font-weight: 500;
}

.feedback-section.submitted .feedback-buttons {
  display: none;
}

.feedback-section.submitted .feedback-thanks {
  display: block;
}

/* ============================================
   TROUBLESHOOTING TABLE
   ============================================ */
.troubleshooting-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 1rem 0;
}

.troubleshooting-table th,
.troubleshooting-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-gray-200);
}

.troubleshooting-table th {
  background: var(--color-gray-800);
  color: white;
  font-weight: 600;
}

.troubleshooting-table tr:nth-child(even) {
  background: var(--color-gray-50);
}

.troubleshooting-table tr:hover {
  background: #f5f3ff;
}

/* ============================================
   GUIDE TABLES (general)
   ============================================ */
.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 1rem 0;
}

.guide-table th,
.guide-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-gray-200);
}

.guide-table th {
  background: var(--color-gray-100);
  font-weight: 600;
  color: var(--color-gray-700);
}

.guide-table tr:hover {
  background: var(--color-gray-50);
}

/* ============================================
   GUIDE STEPS (ordered list style)
   ============================================ */
.guide-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.guide-steps > li {
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 1.5rem;
}

.guide-steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

.guide-steps > li strong {
  display: block;
  font-size: 1rem;
  color: var(--color-gray-900);
  margin-bottom: 0.25rem;
}

.guide-steps > li p {
  color: var(--color-gray-600);
  margin: 0;
}

/* ============================================
   SIDEBAR SECTIONS
   ============================================ */
.sidebar-section {
  background: white;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.sidebar-section h4 {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
}

.sidebar-nav li {
  margin-bottom: 0.5rem;
}

.sidebar-nav a {
  color: var(--color-gray-600);
  text-decoration: none;
  font-size: 0.875rem;
  display: block;
  padding: 0.25rem 0;
}

.sidebar-nav a:hover {
  color: var(--color-primary);
}

/* ============================================
   SKIP LINK (Accessibility)
   ============================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--color-primary);
  color: white;
  border-radius: 0.5rem;
  z-index: 9999;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* Print Styles */
@media print {
  .guide-sidebar,
  .guide-nav,
  .lang-selector,
  .reading-progress,
  .lightbox,
  .feedback-section,
  .quick-actions {
    display: none;
  }

  .guide-container {
    grid-template-columns: 1fr;
  }

  .guide-content {
    box-shadow: none;
    padding: 0;
  }
}
