/* ===========================
   WordPress Default Font & Colors
   =========================== */
body, .ubv2-booking-container * {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ===========================
   Full Width Container Override
   =========================== */
#ubv2-booking-root {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* ===========================
   Welcome Modal (Show on Page Load)
   =========================== */
.ubv2-welcome-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.ubv2-welcome-content {
  background: #fff;
  padding: 50px;
  border-radius: 12px;
  text-align: center;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid #e0e0e0;
}

.ubv2-welcome-content h2 {
  color: #0676BB;
  margin-bottom: 25px;
  font-size: 32px;
  font-weight: 600;
}

.ubv2-welcome-content p {
  font-size: 18px;
  color: #555;
  margin-bottom: 35px;
  line-height: 1.6;
}

/* ===========================
   Main Booking Container (Full Page Width)
   =========================== */
.ubv2-booking-container {
  width: 100vw;
  max-width: 100vw;
  margin: 0;
  padding: 20px 40px;
  background: #fff;
  box-sizing: border-box;
  min-height: 100vh;
}

/* Remove step progress bar completely */
.ubv2-step-bar,
.ubv2-progress-bar-bg {
  display: none !important;
}

/* ===========================
   Step Content Areas (Full Width)
   =========================== */
.ubv2-step-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 18px !important; /* compact */
  background: #fafafa;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.ubv2-step-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ubv2-step-content h3 {
  text-align: center;
  color: #0676BB;
  font-size: 20px !important; /* compact */
  font-weight: 600;
  margin-bottom: 10px !important; /* compact */
}

/* ===========================
   Map Select/Selected Count Row (NEW)
   =========================== */
.ubv2-map-row {
  display: flex;
  justify-content: center;       /* Center the row horizontally */
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.ubv2-map-col {
  flex: 0 1 320px;               /* Shrink to content, max 320px */
  min-width: 180px;
  text-align: center;            /* Center dropdown and label */
}
.ubv2-selected-units-summary {
  flex: 0 1 220px;
  text-align: center;            /* Center the selected count */
  font-weight: 600;
  color: #0676BB;
  font-size: 16px;
  margin-top: 24px;              /* Align vertically with dropdown */
}
@media (max-width: 900px) {
  .ubv2-map-row {
    flex-direction: column;
    gap: 10px;
    max-width: 100%;
    align-items: center;
  }
  .ubv2-selected-units-summary {
    text-align: left;
  }
}

/* ===========================
   Floor Plan Dropdown (Centered)
   =========================== */
.ubv2-floor-select-wrapper {
  max-width: 500px;
  margin: 0 auto 40px;
  text-align: center;
}

.ubv2-floor-select-wrapper label {
  display: block;
  margin-bottom: 15px;
  font-weight: 600;
  color: #1d2327;
  font-size: 18px;
}

#ubv2-map-select {
  width: 100%;
  padding: 6px 8px !important;
  border: 1px solid #ccc;
  border-radius: 6px !important;
  font-size: 14px !important;
  background: #fff;
  color: #1d2327;
  font-family: inherit;
  cursor: pointer;
  box-sizing: border-box;
  /* Remove appearance: none unless you use a custom arrow */
}

/* ===========================
   Selected Units Display (Count Only)
   =========================== */
.ubv2-selected-units {
  text-align: center;
  margin: 30px auto;
  padding: 25px;
  background: #f0f8ff;
  border-radius: 10px;
  border: 1px solid #0676BB;
  border-left: 4px solid #0676BB;
  max-width: 800px;
}

.ubv2-selected-units strong {
  color: #0676BB;
  font-weight: 600;
  font-size: 20px;
}

.ubv2-units-list {
  color: #1d2327;
  margin-top: 10px;
  font-size: 14px;
}

/* Hide detailed units list in step 1, show only in step 2 */
.ubv2-step-content[data-step="1"] .ubv2-units-list {
  display: none;
}

.ubv2-step-content[data-step="2"] .ubv2-units-list {
  display: block;
}

/* ===========================
   Map Area (Full Width)
   =========================== */
#ubv2-map-area {
  text-align: center;
  margin: 40px 0;
  border: 2px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
  background: #f9f9f9;
  width: 100%;
  max-width: 100%;
}

#ubv2-map-area svg {
  width: 100%;
  height: auto;
  display: block;
  min-height: 400px;
  max-height: 700px;
}

.ub-pin, .ub-pin circle {
  cursor: pointer;
}
.ub-pin[data-status="booked"], .ub-pin[data-status="booked"] circle {
  cursor: not-allowed !important;
}

.ub-pin circle {
  transition: all 0.2s ease;
}
.ub-pin circle:hover {
  /* filter: brightness(1.1); */
  /* transform: scale(1.15); */
}

/* ===========================
   Form Styling (Four Columns Full Width)
   =========================== */
.ubv2-form-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px !important;
  margin: 8px 0 !important;
  width: 100%;
  max-width: 100%;
}
@media (max-width: 1100px) {
  .ubv2-form-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .ubv2-form-columns {
    grid-template-columns: 1fr;
  }
}

.ubv2-form-field {
  margin-bottom: 5px !important; /* compact */
}

.ubv2-form-field input,
.ubv2-form-field select,
.ubv2-form-field textarea {
  width: 100%;
  padding: 6px 8px !important;
  border: 1px solid #ccc;
  border-radius: 6px !important;
  font-size: 14px !important;
  background: #fff;
  color: #1d2327;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
  cursor: pointer;
}

.ubv2-form-field input:focus,
.ubv2-form-field select:focus,
.ubv2-form-field textarea:focus {
  outline: none;
  border-color: #0676BB;
  box-shadow: 0 0 0 3px rgba(6, 118, 187, 0.1);
}

.ubv2-form-field input::placeholder,
.ubv2-form-field textarea::placeholder {
  color: #6c757d !important;
  opacity: 1 !important;
}

.ubv2-form-field select {
  cursor: pointer;
}

.ubv2-form-field textarea {
  resize: vertical;
  min-height: 80px;
}

/* ===========================
   Optional Questions & Comments Side-by-Side
   =========================== */
.ubv2-form-row-side {
  display: flex;
  gap: 20px;
  width: 100%;
  margin-bottom: 10px;
}
.ubv2-optional-questions {
  flex: 1 1 5%;
  min-width: 200px;
  max-width: 320px;
}
.ubv2-comments-field {
  flex: 2 1 0;
  display: flex;
}
.ubv2-comments-field textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
}
@media (max-width: 900px) {
  .ubv2-form-row-side {
    flex-direction: column;
    gap: 10px;
  }
  .ubv2-optional-questions,
  .ubv2-comments-field {
    max-width: 100%;
    min-width: 0;
  }
}

/* ===========================
   Optional Questions Dropdown (Fixed & Full Width)
   =========================== */
.ubv2-optional-questions {
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 12px;
}

.ubv2-optional-header {
  padding: 10px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #1d2327;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s ease;
  font-size: 15px;
}

.ubv2-optional-header:hover {
  background: #e9ecef;
  color: #0676BB;
}

.ubv2-optional-content {
  padding: 12px;
  display: none;
  max-height: 250px;
  overflow-y: auto;
  border-radius: 0 0 8px 8px;
}

.ubv2-optional-content.active {
  display: block;
}

.ubv2-question-group {
  margin-bottom: 18px;
}

.ubv2-question-group:last-child {
  margin-bottom: 0;
}

.ubv2-question-group h5 {
  color: #0676BB;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 15px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 6px;
}

.ubv2-question-item {
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.ubv2-question-item:hover {
  background-color: #f8f9fa;
  padding-left: 4px;
  margin-left: -4px;
  margin-right: -4px;
}

.ubv2-question-item input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #0676BB;
}

.ubv2-question-item label {
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  flex: 1;
}

/* ===========================
   Buttons (Centered & Full Width)
   =========================== */
.ubv2-button-group {
  text-align: center;
  margin: 20px 0 !important;
  padding-top: 12px !important;
  border-top: 1px solid #e0e0e0;
}

.ubv2-btn {
  display: inline-block;
  background: #0676BB;
  color: #fff;
  border: none;
  padding: 8px 20px !important;
  border-radius: 8px;
  font-size: 14px !important;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin: 0 4px !important;
  transition: all 0.3s ease;
  font-family: inherit;
  border: 2px solid #0676BB;
  min-width: 100px !important;
}

.ubv2-btn:hover {
  background: #055a99;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(6, 118, 187, 0.4);
}

.ubv2-btn:active {
  transform: translateY(0);
}

.ubv2-btn:disabled {
  background: #ccc;
  border-color: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ubv2-btn.secondary {
  background: #fff;
  color: #666;
  border: 2px solid #ccc;
}

.ubv2-btn.secondary:hover {
  background: #f5f5f5;
  border-color: #999;
  color: #333;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ===========================
   Units Summary (Step 2 Only) - Full Width
   =========================== */
.ubv2-units-summary-detailed {
  background: #f0f8ff;
  border: 2px solid #0676BB;
  border-radius: 12px;
  padding: 12px !important;
  margin-bottom: 10px !important;
  width: 100%;
  box-sizing: border-box;
}

.ubv2-units-summary-detailed h4 {
  color: #0676BB;
  margin-bottom: 12px;
  font-size: 16px;
  text-align: center;
}

.ubv2-units-summary-detailed ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.ubv2-units-summary-detailed li {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ===========================
   Success Message
   =========================== */
.ubv2-success {
  text-align: center;
  padding: 40px 10px !important;
}

.ubv2-success-icon {
  color: #00a32a;
  font-size: 60px;
  margin-bottom: 18px;
}

.ubv2-success h3 {
  color: #00a32a;
  margin-bottom: 14px;
  font-size: 22px;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 1400px) {
  .ubv2-booking-container {
    padding: 20px 30px;
  }
}

@media (max-width: 1200px) {
  .ubv2-form-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px !important;
  }
}

@media (max-width: 768px) {
  .ubv2-booking-container {
    padding: 15px 10px;
  }
  .ubv2-step-content {
    padding: 12px !important;
  }
  .ubv2-form-columns {
    grid-template-columns: 1fr;
    gap: 10px !important;
  }
  .ubv2-btn {
    display: block;
    width: 100%;
    margin: 10px 0 !important;
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
  }
  .ubv2-welcome-content {
    padding: 22px;
  }
  .ubv2-step-content h3 {
    font-size: 16px !important;
  }
  #ubv2-map-area svg {
    min-height: 180px;
    max-height: 320px;
  }
  .ubv2-form-row-side {
    flex-direction: column;
    gap: 10px;
  }
  .ubv2-optional-questions,
  .ubv2-comments-field {
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .ubv2-booking-container {
    padding: 8px 4px;
  }
  .ubv2-step-content {
    padding: 8px !important;
  }
  .ubv2-units-summary-detailed ul {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   Loading States
   =========================== */
.ubv2-loading {
  text-align: center;
  padding: 32px !important;
}

.ubv2-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0676BB;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===========================
   Override WordPress Theme Constraints
   =========================== */
.ubv2-booking-container,
.ubv2-booking-container * {
  max-width: none !important;
}

/* Ensure full viewport width */
#ubv2-booking-root .ubv2-booking-container {
  position: relative;
  left: 0;
  right: 0;
  margin: 0;
  width: 100vw;
  max-width: 100vw;
}

/* Placeholders (leave for backward compat, but last one wins) */
.ubv2-form-field input[type="text"]::placeholder,
.ubv2-form-field input[type="email"]::placeholder,
.ubv2-form-field input[type="tel"]::placeholder {
  color: #1d2327 !important;
  opacity: 1;
}

.ubv2-form-field input::placeholder,
.ubv2-form-field textarea::placeholder {
  color: #6c757d !important;
  opacity: 1 !important;
}
.ubv2-form-field input::placeholder,
.ubv2-form-field textarea::placeholder {
  color: #495057 !important;
  opacity: 1 !important;
}
#ubv2-booking-root .ubv2-form-field input::placeholder,
#ubv2-booking-root .ubv2-form-field textarea::placeholder,
.ubv2-booking-container .ubv2-form-field input::placeholder,
.ubv2-booking-container .ubv2-form-field textarea::placeholder {
  color: #1d2327 !important;
  opacity: 1 !important;
}
#ubv2-booking-root input[placeholder*="Full Name"]::placeholder,
#ubv2-booking-root input[placeholder*="Email Address"]::placeholder,
#ubv2-booking-root input[placeholder*="Phone Number"]::placeholder {
  color: #1d2327 !important;
  opacity: 1 !important;
}
#ubv2-booking-root .ubv2-form-field input::placeholder,
#ubv2-booking-root .ubv2-form-field textarea::placeholder {
  color: #1d2327 !important;
  opacity: 0.8 !important;
}
div#ubv2-booking-root .ubv2-booking-container .ubv2-step-content .ubv2-form-columns .ubv2-form-field input::placeholder,
div#ubv2-booking-root .ubv2-booking-container .ubv2-step-content .ubv2-form-columns .ubv2-form-field textarea::placeholder {
  color: #1d2327 !important;
  opacity: 1 !important;
}

.ubv2-form-field,
.ubv2-form-columns > * {
  min-width: 0;
}

.ubv2-question-group {
	text-align: left !important;
}