/* ============================================================
   🐾 HAPPY PUPPY MASTER INTAKE STYLING (2026 Boutique v1.2)
   ============================================================ */

:root {
  --primary-red: #940012; /* Happy Puppy Red */
  --primary-yellow: #f0c605; /* Boutique Gold */
  --alert-red: #d32f2f; /* Critical Warning Red */
  --soft-bg: #fdfdfd;
  --text-dark: #333;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* --- BASE BODY & LOGO --- */
body.boutique-form-bg {
  background-color: #f5f5f5;
  font-family: "Roboto", sans-serif;
  color: var(--text-dark);
  margin: 0;
  padding: 20px;
}

.form-logo {
  max-width: 300px !important;
  height: auto !important;
  display: block;
  margin: 0 auto 20px auto;
}

/* --- CONTAINERS --- */
.form-container {
  max-width: 900px; /* Slightly wider for the 5-column grid */
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border-top: 8px solid var(--primary-red);
}

.form-section {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--primary-yellow);
}

/* --- HEADERS --- */
.form-header h1 {
  font-family: "Merriweather", serif;
  color: var(--primary-red);
  border-bottom: 3px solid var(--primary-yellow);
  display: inline-block;
  padding-bottom: 10px;
}

h2 {
  font-family: "Merriweather", serif;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-red);
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-yellow);
}

h4 {
  font-family: "Roboto", sans-serif;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: var(--primary-red);
  margin-bottom: 15px;
}

/* --- GRIDS & INPUTS --- */
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.input-group label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--primary-red);
  text-transform: uppercase;
  margin-bottom: 4px;
  display: block;
}

/* 🆔 5-COLUMN IDENTITY GRID FIX */
.grid-pet-identity {
  display: grid !important;
  grid-template-columns: 1.5fr 1fr 1.2fr 0.8fr 1fr !important; /* Fits Name, Type, Breed, Weight, Vax */
  gap: 15px;
  margin-bottom: 20px;
}

/* --- 🥣 FEEDING RECIPE ROWS --- */
.feed-row {
  display: grid !important;
  grid-template-columns: 140px 30px 1fr 100px 40px !important;
  gap: 12px;
  align-items: center;
  background: #fafafa;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #eee;
  margin-bottom: 8px;
}

.feed-row select,
.feed-row input {
  margin: 0 !important;
  padding: 8px !important;
}

/* --- 💊 CLINICAL MEDICATION LEDGER --- */
.med-row {
  background: #fffdf9;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid var(--primary-yellow);
  margin-bottom: 15px;
}

/* --- 🏥 GOLD STANDARD VET PREVIEW TABLE --- */
#previewPetTable table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 15px;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
}

#previewPetTable th {
  background: #fdfaf0;
  color: var(--primary-red);
  font-family: "Merriweather", serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 12px;
  border-bottom: 2px solid var(--primary-yellow);
  text-align: left;
}

#previewPetTable td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}

/* --- ⚠️ URGENT ALERTS --- */
.urgent-alert-item {
  background: #fff5f5;
  padding: 10px;
  border-left: 5px solid var(--alert-red);
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: #c62828;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 4px;
}

/* --- BOUTIQUE BUTTONS --- */
#addPetBtn {
  background-color: var(--primary-red);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#addPetBtn:hover {
  background-color: var(--primary-yellow);
  color: #333;
}

/* --- MOBILE OPTIMIZATION --- */
@media screen and (max-width: 768px) {
  .grid-pet-identity {
    grid-template-columns: 1fr 1fr !important; /* Stacks on small screens */
  }
  .feed-row {
    grid-template-columns: 1fr 1fr !important;
    height: auto;
  }
  .form-container {
    padding: 15px;
  }
}
/* ============================================================
   🐾 CHECKBOX & LABEL ALIGNMENT (Boutique Sync)
   ============================================================ */

/* 1. Reset the width so the box doesn't take up the whole line */
input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  cursor: pointer;
  flex-shrink: 0; /* Prevents the box from squishing on mobile */
}

/* 2. Force labels in service sections to be a single aligned row */
.form-section label,
.medical-emergency-zone label,
div[style*="grid-template-columns"] label {
  display: flex !important;
  flex-direction: row !important; /* Forces checkbox and text on ONE line */
  align-items: center !important;
  gap: 12px !important; /* Balanced gap between checkbox, icon, and text */
  width: 100%;
  cursor: pointer;
  padding: 5px 0;
  text-transform: none; /* Keeps "Hourly Sitting" readable */
}

/* 3. Fix the specific layout in Key Management (image_564ea8.png) */
div[style*="grid-template-columns: 1fr 1fr 1fr"] {
  display: grid !important;
  align-items: center !important;
  gap: 20px !important;
}

/* 4. Ensure Material Icons center vertically with the text */
.material-icons {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.2rem;
}

/* 5. Highlight the "Meet & Greet" to match your brand */
label[for*="meet_greet"],
.meet-greet-label {
  color: var(--primary-red);
  font-weight: 800;
}
/*-----------------------------*/
/* 📍 THE BOUTIQUE MAP ENGINE */
/*-----------------------------*/
#map {
  height: 350px !important;
  border: 3px solid #940012 !important; /* Happy Puppy Red Border */
  border-radius: 16px !important; /* High-end rounded corners */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* Modern deep shadow */
  margin-top: 15px;
  overflow: hidden;
}

/* Style the Leaflet Zoom Controls to match your brand */
.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  background-color: #ffffff !important;
  color: #940012 !important;
  border: 2px solid #f1c40f !important; /* Yellow Border */
  font-weight: bold !important;
}

.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover {
  background-color: #f1c40f !important;
  color: #000000 !important;
}

/* Custom "Pulse" effect for the Gate Pin */
.hp-custom-pin {
  background-color: #940012;
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(148, 0, 18, 0.5);
}

.hp-custom-pin::after {
  content: "";
  width: 12px;
  height: 12px;
  background: #f1c40f; /* Yellow Center */
  border-radius: 50%;
}
/* 🏠 BOUTIQUE ADDRESS NAVIGATION STYLING */
#my-profile-panel fieldset {
  border: 1.5px solid #eee;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  background-color: #fffdfd;
}

#my-profile-panel legend {
  font-family: "Merriweather", serif;
  color: #940012; /* Happy Puppy Red */
  font-weight: 700;
  padding: 0 10px;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

/* Style the Search Inputs (Street, Suburb, City) */
#clientAddressStreet,
#clientAddressSuburb,
#clientAddressCity {
  border: 2px solid #eee !important;
  border-radius: 8px !important;
  padding: 12px 15px !important;
  font-family: "Roboto", sans-serif;
  transition: all 0.3s ease;
  background-color: #ffffff !important;
}

#clientAddressStreet:focus,
#clientAddressSuburb:focus,
#clientAddressCity:focus {
  border-color: #f1c40f !important; /* Yellow focus glow */
  box-shadow: 0 0 8px rgba(241, 196, 15, 0.2) !important;
  outline: none;
}

/* The Info Tip above the Map */
.map-tip {
  background-color: #f0f7ff;
  border-left: 5px solid #0056b3;
  padding: 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.map-tip strong {
  color: #940012;
}
/* 📍 BOUTIQUE MAP NAVIGATION BUTTONS */
.hp-map-container .form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
}

/* Base style for both buttons to override basic defaults */
.hp-map-container .form-button-small {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 15px !important; /* Professional height */
  border: none !important;
  border-radius: 8px !important; /* High-end rounded corners */
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* "Use My GPS" Button - Primary Yellow */
.hp-map-container .form-button-small:first-child {
  background-color: #f1c40f !important; /* Primary Yellow */
  color: #000000 !important; /* True Black for contrast */
}

/* "Find My Street" Button - Primary Red */
.hp-map-container .form-button-small:last-child {
  background-color: #940012 !important; /* Primary Red */
  color: #ffffff !important; /* White text */
}

/* Boutique Hover Effects */
.hp-map-container .form-button-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  filter: brightness(1.1);
}

.hp-map-container .form-button-small:active {
  transform: translateY(0);
}

/* Icon Alignment inside buttons */
.hp-map-container .form-button-small .material-icons {
  font-size: 1.2rem;
}
.boutique-input {
    padding: 12px !important;
    box-sizing: border-box !important;
    font-size: 1rem !important;
    min-height: 45px !important;
  }
  @media print {
  /* 1. Hide everything on the page by default */
  body * {
    visibility: hidden;
  }

  /* 2. Show ONLY the modal content and its children */
  #quoteDetailContent, #quoteDetailContent * {
    visibility: visible;
  }

  /* 3. Position the modal content at the top left of the page */
  #quoteDetailContent {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}
/* ============================================================
   📱 MOBILE RESPONSIVE WRAPPER & CONTAINER FIXES
   ============================================================ */

@media screen and (max-width: 768px) {
  /* 1. Force the main container and sections to stay fluidly inside the viewport */
  .form-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  .form-section {
    width: 100% !important;
    max-width: 100% !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* 2. Prevent inputs, textareas, and selects from breaking out */
  input,
  select,
  textarea,
  .boutique-input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 3. Stack grid elements cleanly on small displays */
  .grid-pet-identity,
  .feed-row,
  .hp-map-container .form-row {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 4. Ensure internal text containers wrap properly */
  div, span, p, label {
    box-sizing: border-box !important;
    word-break: break-word;
  }
}
@media screen and (max-width: 768px) {
  /* 1. Force all fieldsets and inner cards to fit the mobile width */
  .pet-identity-section fieldset,
  .emergency-gold-box,
  .mobility-assistance-zone,
  .medical-emergency-zone {
    width: 100% !important;
    max-width: 100% !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 2. Strip out fixed max-widths on selects and text fields inside cards */
  .pet-identity-section select,
  .pet-identity-section input,
  .pet-identity-section textarea,
  #petVet_pet_1,
  #petInsuranceName_pet_1,
  #petMobilityStatus_pet_1,
  #newChronicCondition_pet_1 {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 3. Stack any inline flex rows vertically on mobile */
  .pet-identity-section .form-row,
  .emergency-gold-box .form-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }
}