/* Custom CSS for Chiang Mai Real Estate Management Web App */

body {
  font-family: 'Prompt', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Navigation Tabs */
.nav-tab.active {
  background-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Operator Badges */
.badge-tot {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.badge-ttt {
  background-color: #ffedd5;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
.badge-cat {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.badge-nt {
  background-color: #fef9c3;
  color: #854d0e;
  border: 1px solid #fef08a;
}

/* Status Badges */
.badge-status-ready {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.badge-status-rented {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.badge-status-inuse {
  background-color: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Table Row Hover */
#property-table-body tr {
  transition: background-color 0.15s ease;
}
#property-table-body tr:hover {
  background-color: #f8fafc;
}

/* Leaflet Custom Marker Icons */
.custom-pin {
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 0;
  position: absolute;
  transform: rotate(-45deg);
  left: 50%;
  top: 50%;
  margin: -15px 0 0 -15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.custom-pin::after {
  content: '';
  width: 10px;
  height: 10px;
  margin: 0;
  background: #ffffff;
  position: absolute;
  border-radius: 50%;
}
.pin-ready {
  background-color: #10b981;
}
.pin-rented {
  background-color: #3b82f6;
}
.pin-inuse {
  background-color: #f59e0b;
}

/* Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}
.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4;
  font-family: 'Prompt', 'Sarabun', sans-serif;
}

/* Toast Notifications */
.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Print Stylesheet */
@media print {
  header, footer, nav, #modal-property-form, #toast-container, .metric-card, .btn-no-print {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    font-size: 11pt !important;
  }
  #view-properties, #modal-detail-view {
    display: block !important;
    position: static !important;
  }
  table {
    width: 100% !important;
    border-collapse: collapse !important;
  }
  th, td {
    border: 1px solid #cbd5e1 !important;
    padding: 6px !important;
  }
}
