/* Roof Manager - Roofing Measurement Tool Styles */

/* Logo container — eliminates white-glow artifact on colored backgrounds */
.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}
/* Light-page variant (login, portals on white bg) */
.logo-mark-light {
  background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
/* Dark footer variant */
.logo-mark-dark {
  background: rgba(255,255,255,0.1);
}
/* Landing nav (transparent/dark bg) */
.logo-mark-nav {
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Step indicator animations */
.step-active {
  animation: stepPulse 2s ease-in-out infinite;
}
@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

/* Tier card selection */
.tier-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.tier-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}
.tier-card.selected {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(59, 130, 246, 0.3);
}

/* Form transitions */
.step-panel {
  animation: fadeSlideIn 0.4s ease-out;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Map container */
.map-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Toast notifications */
.toast {
  animation: slideInRight 0.3s ease-out;
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast-exit {
  animation: slideOutRight 0.3s ease-in forwards;
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* Loading spinner */
.spinner {
  border: 3px solid rgba(255,255,255,0.3);
  border-top: 3px solid #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Price badge */
.price-badge {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 1.1rem;
}

/* Status badges */
.status-pending { background: #fef3c7; color: #92400e; }
.status-paid { background: #dbeafe; color: #1e40af; }
.status-processing { background: #e0e7ff; color: #3730a3; }
.status-completed { background: #dbeafe; color: #1e40af; }
.status-failed { background: #fee2e2; color: #991b1b; }
.status-cancelled { background: #f3f4f6; color: #4b5563; }

/* Smooth scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ═══ GLOBAL MOBILE RESPONSIVE ═══ */
@media (max-width: 768px) {
  /* Ensure all pages use full width */
  .max-w-7xl, .max-w-6xl, .max-w-5xl, .max-w-4xl, .max-w-3xl {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Headers / navs responsive */
  header .flex { flex-wrap: wrap; gap: 8px; }
  header nav { gap: 4px !important; }
  header nav a, header nav button { font-size: 11px !important; padding: 4px 8px !important; }
  
  /* Modals full-width on mobile */
  [style*="max-width:640px"], [style*="max-width:600px"], [style*="max-width:580px"] {
    max-width: 95vw !important;
    width: 95vw !important;
    margin: 10px auto !important;
  }
  
  /* Tables always scroll on mobile */
  table { font-size: 13px !important; }
  th, td { padding: 8px 10px !important; white-space: nowrap; }
  
  /* Grid columns — force stack on small phones */
  .grid.md\\:grid-cols-2, .grid.md\\:grid-cols-3, .grid.md\\:grid-cols-4 {
    grid-template-columns: 1fr !important;
  }
  
  /* Fix font sizes for readability */
  h1 { font-size: 22px !important; }
  h2 { font-size: 18px !important; }
  
  /* Fix button sizing for touch targets */
  button, a.btn, .btn, [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Fix inputs for mobile */
  input, textarea, select {
    font-size: 16px !important; /* Prevents iOS zoom */
  }
}

@media (max-width: 400px) {
  .max-w-7xl, .max-w-6xl, .max-w-5xl, .max-w-4xl, .max-w-3xl {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

/* Touch-friendly targets */
@media (hover: none) and (pointer: coarse) {
  a, button { min-height: 44px; }
  input, textarea, select { min-height: 44px; }
}

/* Safe areas for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
}

/* Print styles for report */
@media print {
  header, footer, nav, .no-print { display: none !important; }
  body { background: white !important; }
}
