/*
 * 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.
 */

/* Custom Leaflet Map Styles - Inline to fix Propshaft @import issues */

/* Custom styles for Leaflet OS Map */

.property-marker {
  background: transparent !important;
  border: none !important;
}

.property-marker .fa-house {
  font-size: 12px;
}

/* Custom popup styling */
.leaflet-popup-content {
  margin: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
}

.leaflet-popup-content strong {
  color: #1e40af;
}

/* Ensure map container has proper dimensions */
.os-leaflet-map-container,
[data-os-leaflet-map-target="map"] {
  position: relative;
  width: 100%;
  height: 20rem;
  min-height: 20rem;
}

/* Attribution styling */
.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.8) !important;
  font-size: 11px !important;
}

/* Zoom control styling */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-control-zoom a {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  color: #374151 !important;
  font-size: 16px !important;
  font-weight: bold !important;
}

.leaflet-control-zoom a:hover {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
}

/* Building overlay styles */
.building-outline {
  cursor: pointer;
}

.building-part {
  cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .os-leaflet-map-container {
    height: 16rem;
  }
  
  .property-marker {
    transform: scale(0.8);
  }
}

/* Kanban placeholder appear animation */
@keyframes kanban-placeholder-appear {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.kanban-placeholder-appear {
  animation: kanban-placeholder-appear 0.3s ease-out forwards;
}

/* ============================================
   SCORE Selection Components
   Shared styles for radio card selection UI
   Used by: quote cards, terms template selection
   ============================================ */

/* Base selection card styles */
.score-selection-card {
  transition: all 0.15s ease-in-out;
}

.score-selection-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Selected state - uses CSS :has() for parent styling */
.score-selection-card:has(.peer:checked) {
  border-color: #2563eb !important;
  background-color: #eff6ff !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2), 0 4px 12px rgba(37, 99, 235, 0.15) !important;
}

.score-selection-card:has(.peer:checked):hover {
  background-color: #dbeafe !important;
}

.score-selection-card:has(.peer:focus) {
  outline: none;
}

.score-selection-card:focus-within {
  outline: none;
}

/* Radio circle indicator - transforms to blue check on selection */
.score-selection-card:has(.peer:checked) .score-radio-circle {
  border-color: #2563eb !important;
  background-color: #2563eb !important;
}

.score-selection-card:has(.peer:checked) .score-radio-check {
  opacity: 1 !important;
}

/* Inline radio variant - for non-card radio buttons (e.g., contact preference lists) */
.score-inline-radio:has(.peer:checked) .score-radio-circle {
  border-color: #2563eb !important;
  background-color: #2563eb !important;
}

.score-inline-radio:has(.peer:checked) .score-radio-check {
  opacity: 1 !important;
}

/* ============================================
   Prepare Stepper — Container Query Layout
   Switches from horizontal chips to vertical
   sidebar based on content area width (800px).
   ============================================ */
/* Shared stepper content max-width — only applied when sidebar is visible */
.stepper-chip-active { box-shadow: inset 0 -3px 0 #2563eb; }

.prepare-stepper-horizontal { display: block; }
.prepare-stepper-sidebar { display: none; }
.prepare-layout { flex-direction: column; gap: 0; }
.prepare-content { display: flex; flex-direction: column; min-height: 0; }
.prepare-content .conflict-check-embed .p-6 { padding: 0 !important; }
.conflict-check-embed .bg-gray-50 > .border-b:first-child { display: none !important; }
.conflict-check-embed .rounded-lg,
.conflict-check-embed .rounded-md,
.conflict-check-embed .rounded { border-radius: 0 !important; }
.conflict-check-embed .space-y-8 > .bg-gray-50 { background: transparent !important; border: none !important; }
.conflict-check-embed .space-y-8 > .bg-gray-50 > .bg-white { padding: 0.75rem 0 !important; }

@container (min-width: 800px) {
  .prepare-stepper-horizontal { display: none; }
  .prepare-stepper-sidebar { display: flex; flex-direction: column; align-self: start; }
  .prepare-stepper-sidebar > a { box-shadow: none !important; }
  .prepare-layout { flex-direction: row; gap: 0; padding: 1.25rem; }
  .prepare-content { margin-left: 1.25rem; }

}

.prepare-stepper-scroll { -ms-overflow-style: none; scrollbar-width: none; }
.prepare-stepper-scroll::-webkit-scrollbar { display: none; }

.prepare-tab-shadow { box-shadow: 0 4px 8px -2px rgba(0, 0, 0, 0.12); }
.prepare-tab-active { box-shadow: inset 0 -3px 0 #2563eb; }

/* ============================================
   Confirm & Book stepper responsive layout.
   Mirrors prepare stepper breakpoints.
   ============================================ */
.confirm-stepper-horizontal { display: block; }
.confirm-stepper-sidebar { display: none; }
.confirm-layout { flex-direction: column; gap: 0; }
.confirm-content { display: flex; flex-direction: column; min-height: 0; }

@container (min-width: 800px) {
  .confirm-stepper-horizontal { display: none; }
  .confirm-stepper-sidebar { display: flex; flex-direction: column; align-self: start; }
  .confirm-stepper-sidebar > a { box-shadow: none !important; }
  .confirm-layout { flex-direction: row; gap: 0; padding: 1.25rem; }
  .confirm-content { margin-left: 1.25rem; }
}

.confirm-stepper-scroll { -ms-overflow-style: none; scrollbar-width: none; }
.confirm-stepper-scroll::-webkit-scrollbar { display: none; }

/* ============================================
   Report tab stepper — responsive layout
   ============================================ */
.report-stepper-horizontal { display: block; }
.report-stepper-sidebar { display: none; }
.report-layout { flex-direction: column; gap: 0; }
.report-content { display: flex; flex-direction: column; min-height: 0; }

@container (min-width: 800px) {
  .report-stepper-horizontal { display: none; }
  .report-stepper-sidebar { display: flex; flex-direction: column; align-self: start; }
  .report-stepper-sidebar > a { box-shadow: none !important; }
  .report-layout { flex-direction: row; gap: 0; padding: 1.25rem; }
  .report-content { margin-left: 1.25rem; }
}
