/* Quarry Map Block Styles - Following Design System */

/* Map Container */
.quarry-map-block .quarry-leaflet-map,
.quarry-map-section .quarry-leaflet-map {
  position: relative;
  z-index: 1;
}

/* Custom Leaflet Marker Styles - Corporate Yellow Cubes with Material Icons */
.quarry-marker {
  background: var(--secondary-color, #F8B133) !important;
  border: 2px solid white;
  border-radius: 6px; /* Rounded corner cubes */
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  color: white;
}

/* Ensure all marker types use the same yellow background */
.quarry-marker.sand,
.quarry-marker.limestone,
.quarry-marker.gravel,
.quarry-marker.facility {
  background: var(--secondary-color, #F8B133) !important;
}

.quarry-marker:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* Material Symbols icon styling */
.quarry-marker .material-symbols-outlined {
  font-size: 20px;
  font-weight: 500;
  color: white;
  user-select: none;
}

/* Status bubble in top right corner */
.quarry-marker::after {
  content: '';
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.quarry-marker.active_daily::after {
  background: #10b981;
}

.quarry-marker.limited::after {
  background: var(--accent-color, #f59e0b);
}

.quarry-marker.by_appointment::after {
  background: var(--primary-color, #3b82f6);
}

/* Active state for selected marker */
.quarry-marker.active {
  transform: scale(1.15);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

/* Marker Cluster Styles - Use Theme Colors */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-clip: padding-box !important;
  border-radius: 50% !important;
}

.marker-cluster-small div {
  width: 30px !important;
  height: 30px !important;
  margin: 5px !important;
  text-align: center !important;
  border-radius: 50% !important;
  font: 12px var(--font-body, 'Nunito Sans', sans-serif) !important;
  font-weight: 700 !important;
  background-color: var(--secondary-color, #F8B133) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.marker-cluster-small span {
  color: white !important;
}

.marker-cluster-medium div {
  width: 40px !important;
  height: 40px !important;
  margin: 5px !important;
  text-align: center !important;
  border-radius: 50% !important;
  font: 14px var(--font-body, 'Nunito Sans', sans-serif) !important;
  font-weight: 700 !important;
  background-color: var(--secondary-color, #F8B133) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.marker-cluster-medium span {
  color: white !important;
}

.marker-cluster-large div {
  width: 50px !important;
  height: 50px !important;
  margin: 5px !important;
  text-align: center !important;
  border-radius: 50% !important;
  font: 16px var(--font-body, 'Nunito Sans', sans-serif) !important;
  font-weight: 700 !important;
  background-color: var(--secondary-color, #F8B133) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.marker-cluster-large span {
  color: white !important;
}

.marker-cluster {
  background-clip: padding-box !important;
  border-radius: 50% !important;
}

.marker-cluster div {
  width: 30px !important;
  height: 30px !important;
  margin: 5px !important;
  text-align: center !important;
  border-radius: 50% !important;
  font: 12px var(--font-body, 'Nunito Sans', sans-serif) !important;
  font-weight: 700 !important;
  background-color: var(--secondary-color, #F8B133) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.marker-cluster span {
  color: white !important;
}

/* Cluster animations and outer ring */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(0, 69, 142, 0.2) !important;
}

.marker-cluster-small:hover div,
.marker-cluster-medium:hover div,
.marker-cluster-large:hover div {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Status Indicators - Corporate Style with Left Border Lines */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 0; /* NO rounded corners per design system */
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f8f9fa;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #d1d5db;
}

.status-badge.active_daily {
  background: #f8f9fa;
  color: #374151;
  border-left-color: #10b981;
}

.status-badge.active_limited {
  background: #f8f9fa;
  color: #374151;
  border-left-color: var(--accent-color, #f59e0b);
}

.status-badge.by_appointment {
  background: #f8f9fa;
  color: #374151;
  border-left-color: var(--primary-color, #3b82f6);
}

.status-badge.limited {
  background: #f8f9fa;
  color: #374151;
  border-left-color: var(--accent-color, #f59e0b);
}

/* Status Alert - Enhanced */
.status-alert,
.status-alert-compact,
.status-alert-streamlined,
.status-alert-enhanced {
  border-radius: 0;
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
}

.status-alert-enhanced {
  line-height: 1.4;
}

.status-alert-enhanced p {
  line-height: 1.4;
}

/* Sidebar Quarry Item - Corporate Style with Status Border */
.sidebar-quarry-item,
.quarry-item,
.facility-item {
  padding: 0.375rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
  background: white;
  position: relative;
  margin-left: 0 !important;
  padding-left: 0.75rem !important;
}

.sidebar-quarry-item:hover,
.quarry-item:hover,
.facility-item:hover {
  background-color: #f8f9fa;
}

/* Ensure no nested indentation */
.region-group {
  margin-left: 0 !important;
}

.region-group .quarry-item,
.region-group .facility-item {
  margin-left: 0 !important;
  padding-left: 0.75rem !important;
}

.sidebar-quarry-item.active {
  background-color: #f8f9fa;
  border-left-color: var(--primary-color, #00458E);
}

/* Status-based left borders */
.quarry-item.active_daily,
.facility-item.active_daily {
  border-left-color: #10b981 !important;
}

.quarry-item.limited,
.facility-item.limited {
  border-left-color: var(--accent-color, #f59e0b) !important;
}

.quarry-item.by_appointment,
.facility-item.by_appointment {
  border-left-color: var(--primary-color, #3b82f6) !important;
}

/* Remove colored dots from sidebar items */
.sidebar-quarry-item .status-indicator,
.quarry-item .status-indicator,
.facility-item .status-indicator {
  display: none;
}

/* Corporate style for quarry type indicators */
.sidebar-quarry-item .quarry-type-icon {
  width: 24px;
  height: 24px;
  background: var(--secondary-color, #F8B133);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  margin-right: 12px;
}

/* Product Grid */
.product-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.product-item {
  padding: 1rem;
  background: #ffffff;
  border-radius: 0; /* NO rounded corners */
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-item:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color, #00458E);
}

.product-item h5,
.product-item h6 {
  font-weight: 700;
  font-family: var(--font-heading, 'GT Walsheim Pro', sans-serif);
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.product-item .specs {
  font-size: 0.875rem;
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
  color: #64748b;
  margin-bottom: 0.5rem;
}

.product-item .price {
  font-weight: 600;
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
  color: var(--primary-color, #00458E);
}

/* Quick Info Cards - ULTRA COMPACT */
.info-card {
  border-radius: 0; /* NO rounded corners */
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
  transition: all 0.2s ease;
  padding: 0.5rem !important;
}

.info-card:hover {
  background-color: #f8fafc;
  border-color: var(--accent-color, #1C6FD9);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quick-info {
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
  gap: 0.5rem !important;
  margin-bottom: 0.75rem !important;
}

.info-card .text-sm {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Address Section */
.address-section {
  border-radius: 0; /* NO rounded corners */
}

.address-section a {
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
  text-decoration: none;
}

.address-section a:hover {
  text-decoration: underline;
}

/* Contact Information */
.contact-info,
.contact-info-section {
  background: #f8fafc;
  border-radius: 0; /* NO rounded corners */
  padding: 1rem;
  margin-top: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
  border-radius: 0; /* NO rounded corners */
  text-decoration: none;
  transition: all 0.2s ease;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-item svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  color: var(--accent-color, #1C6FD9);
  flex-shrink: 0;
}

.contact-item:hover {
  transform: translateX(2px);
}

/* Operating Hours - ULTRA COMPACT */
.operating-hours,
.operating-hours-compact {
  background: #fefce8;
  border: 2px solid var(--secondary-color, #F8B133);
  border-radius: 0; /* NO rounded corners */
  padding: 0;
  margin-top: 0;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.operating-hours > div {
  padding: 1rem;
}

.operating-hours-compact > div {
  padding: 0.375rem 0.5rem;
}

.operating-hours h5,
.operating-hours-compact span {
  font-weight: 700;
  font-family: var(--font-heading, 'GT Walsheim Pro', sans-serif);
  color: #854d0e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.operating-hours p {
  color: #92400e;
  font-size: 1.125rem;
  font-weight: 700;
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
}

.operating-hours-compact {
  border-width: 2px;
  border-left-width: 4px;
}

/* Quarry Description */
.quarry-description {
  border-radius: 0; /* NO rounded corners */
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
}

/* Quarry Details Container - STREAMLINED */
.quarry-details {
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
  padding-bottom: 2rem; /* Add breathing room at bottom */
}

/* Section Headers */
.section-title {
  font-family: var(--font-heading, 'GT Walsheim Pro', sans-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-badge {
  background: var(--accent-color, #1C6FD9);
  color: white;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0;
}

/* Key Info Grid */
.key-info-grid {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 1rem;
  border-radius: 0;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-row:first-child {
  padding-top: 0;
}

.info-label {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  gap: 0.5rem;
}

.info-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
}

/* Product List - Streamlined */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.product-item {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 1rem;
  transition: all 0.2s ease;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

.product-item:hover {
  border-color: var(--accent-color, #1C6FD9);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.product-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.75rem;
}

.product-name {
  font-family: var(--font-heading, 'GT Walsheim Pro', sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  line-height: 1.3;
}

.product-spec {
  background: #f1f5f9;
  color: #64748b;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.25rem;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-status {
  background: #fef3c7;
  color: #92400e;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-pricing {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 2px solid #e5e7eb;
}

.price-main {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  margin-bottom: 0.25rem;
}

.price-amount {
  font-family: var(--font-heading, 'GT Walsheim Pro', sans-serif);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--primary-color, #00458E);
  line-height: 1;
}

.price-unit {
  font-size: 1rem;
  color: #6b7280;
  font-weight: 600;
}

.price-vat {
  font-size: 0.875rem;
  color: #6b7280;
  background-color: #f9fafb;
  padding: 0.375rem 0.75rem;
  border-left: 3px solid #d1d5db;
  display: inline-block;
  border-radius: 0;
}

.pricing-note {
  background: #f8fafc;
  border-left: 4px solid #cbd5e1;
  padding: 0.75rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
  border-radius: 0;
}

/* Products Section */
.products-section {
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
}

.products-section h5 {
  font-family: var(--font-heading, 'GT Walsheim Pro', sans-serif);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

/* Quarry Header - Enhanced Design */
.quarry-header {
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
  position: relative;
}

.quarry-header h3 {
  font-family: var(--font-heading, 'GT Walsheim Pro', sans-serif);
  line-height: 1.2;
  color: #111827;
}

/* Close/Back Button Styling */
.quarry-header .back-to-overview {
  border-radius: 0 !important; /* NO rounded corners per design system */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.quarry-header .back-to-overview:hover {
  background: var(--primary-color, #00458E) !important;
  border-color: var(--primary-color, #00458E) !important;
  box-shadow: 0 2px 4px rgba(0, 69, 142, 0.25);
}

/* Location Block */
.location-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0;
}

.location-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
}

.location-item span {
  flex: 1;
}

.directions-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--accent-color, #1C6FD9);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 0 !important; /* NO rounded corners per design system */
  border: 1px solid var(--accent-color, #1C6FD9);
  background: white;
  padding: 0.375rem 0.75rem;
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
}

.directions-link:hover {
  background: var(--accent-color, #1C6FD9);
  color: white;
  border-color: var(--accent-color, #1C6FD9);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(28, 111, 217, 0.25);
}

.directions-link:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(28, 111, 217, 0.2);
}

.directions-link svg {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

/* Back to Overview Button - Enhanced for Header */
.back-to-overview {
  border-radius: 0 !important; /* NO rounded corners per design system */
  white-space: nowrap;
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
  cursor: pointer;
}

.back-to-overview:hover {
  background-color: var(--primary-color, #00458E) !important;
  color: white !important;
}

.back-to-overview:active {
  transform: scale(0.95);
}

/* Product Item - COMPACT */
.product-item {
  border-radius: 0;
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
}

.product-item h6 {
  font-family: var(--font-heading, 'GT Walsheim Pro', sans-serif);
  font-weight: 700;
  line-height: 1.2;
}

/* Contact Section - Streamlined */
.contact-section {
  margin-top: 1rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-item {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  padding: 1rem !important;
  background: white !important;
  border: 1px solid #e2e8f0 !important;
  transition: all 0.2s ease;
  border-radius: 0 !important;
  border-left: 3px solid var(--secondary-color, #F8B133) !important;
  text-decoration: none !important;
  cursor: pointer;
  color: inherit !important;
}

.contact-item:hover {
  border-left-color: var(--primary-color, #00458E) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
  background: #f9fafb !important;
}

.contact-item svg {
  flex-shrink: 0 !important;
  color: var(--secondary-color, #F8B133) !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
}

.contact-details {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.25rem !important;
  flex: 1 !important;
}

.contact-label {
  display: block !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #6b7280 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  font-family: var(--font-heading, 'GT Walsheim Pro', sans-serif) !important;
  line-height: 1.2 !important;
  margin-bottom: 0.125rem !important;
}

.contact-value {
  display: block !important;
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  color: #00458E !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
  font-family: var(--font-heading, 'GT Walsheim Pro', sans-serif) !important;
  line-height: 1.3 !important;
}

.contact-item:hover .contact-value {
  color: #1C6FD9 !important;
  text-decoration: none !important;
}

/* Mobile Slideout Animations */
.mobile-slideout-open {
  transform: translateY(0) !important;
}

.mobile-overlay-visible {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Loading States */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Map Legend - Bottom Positioned */
.map-legend {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 0 !important; /* NO rounded corners per design system */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.map-legend h4 {
  font-family: var(--font-heading, 'GT Walsheim Pro', sans-serif);
  font-weight: 600;
  color: #111827;
  margin: 0;
}

/* Legend color indicators - Circular status dots */
.map-legend .w-3,
.map-legend .w-2 {
  border-radius: 50% !important; /* Circular like marker status dots */
  flex-shrink: 0;
}

/* Search Input Focus */
.quarry-search input:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 1023px) {
  .quarry-map-container {
    position: relative;
  }

  .mobile-slideout {
    height: auto;
    max-height: 70vh;
  }

  .slideout-content {
    max-height: calc(70vh - 120px);
  }
}

@media (max-width: 767px) {
  .quarry-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .quarry-filters {
    justify-content: center;
  }

  .filter-btn {
    flex: 1;
    min-width: 0;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  .quarry-controls,
  .mobile-slideout-toggle,
  .map-legend {
    display: none !important;
  }

  .quarry-map-container {
    break-inside: avoid;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .quarry-marker {
    border-width: 4px;
  }

  .status-badge {
    border: 2px solid currentColor;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .quarry-marker,
  .sidebar-quarry-item,
  .mobile-slideout,
  .mobile-overlay {
    transition: none !important;
  }

  .loading-skeleton {
    animation: none !important;
  }
}
