.wisebnb-booking-form {
  width:100%;
}

.wisebnb-booking-form form {
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Label Styling */
.wisebnb-booking-form form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}

/* Input Styling */
.wisebnb-booking-form form input[type="text"],
.wisebnb-booking-form form input[type="number"],
.wisebnb-booking-form form select,
.wisebnb-booking-form form button {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

.wisebnb-booking-form form input[type="text"]:focus,
.wisebnb-booking-form form input[type="number"]:focus,
.wisebnb-booking-form form select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
    outline: none;
}

/* Read-only Inputs */
.wisebnb-booking-form form input[readonly] {
    background-color: #f1f1f1;
    cursor: pointer;
}

/* Button Styling */
.wisebnb-booking-form form button[type="submit"] {
    background-color: var(--primary-color)!important;
    border: none!important;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.wisebnb-booking-form form button[type="submit"]:hover {
    background-color: var(--primary-color-hover)!important;
}

/* Form Container (ensure it limits the width of the form) */
.wisebnb-booking-form .form-container {
    position: relative;
    margin: 0 auto; /* Center it if necessary */
}

/* Toggle Button Base */
.toggle-button {
    margin-top:20px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.toggle-button:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Enhanced shadow */
}

.toggle-button:active {
    transform: translateY(0); /* Reset lift on click */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2); /* Slightly reduced shadow */
}

/* Toggle Button Active State (Add this dynamically when toggled) */
.toggle-button.active {
    background-color: #ff5a5f; /* Change color to signify active state */
    color: #fff; /* Maintain white text */
    border: 1px solid #ddd; /* Optional: Border for better contrast */
}

/* Person Types Section */
.person-types-wrapper {
    position: relative;
    max-width: 100%; /* Restrict width to the viewport */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.overlap-section {
    display: block; /* Initially hidden, toggled via JS */
    padding: 20px; /* Add consistent padding to match other fields */
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(50, 50, 50, 0.3); /* Soft shadow for a modern card look */
    position: absolute; /* Ensure it overlaps */
    z-index: 10; /* Place it above other elements */
    margin: 0;
    width: calc(100% - 40px); /* Reduce width by 40px to add margins (20px each side) */
    box-sizing: border-box; /* Include padding in the width calculation */
    left: 20px; /* Offset to match the margin from the form border */
    right: 20px; /* Ensure the right side respects the form border */
}

/* Individual Person Type Items */
.person-type-item {
    display: flex;
    justify-content: space-between; /* Space between title and control */
    align-items: center; /* Align items vertically */
    margin-bottom: 15px;
}

/* Optional: Parent container should have position: relative */
.person-type-toggle {
    position: relative; /* Ensure the .person-types-section is positioned relative to this */
}

/* Person Details Title */
.person-details-title {
    display: flex;
    flex-direction: column; /* Stack title and age vertically */
    gap: 4px; /* Small gap between title and age */
}

.person-details-title h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0; /* No extra spacing */
}

.person-details-title p {
    font-size: 0.85rem;
    color: #555;
    margin: 0;
}

/* Control Buttons Styling */
.person-type-control {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between buttons and display */
}

.person-type-control button {
    background-color: var(--primary-color)!important;
    color: #fff;
    font-size: 1.2rem;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.person-type-control button:hover {
    background-color: var(--primary-color-hover);
}

.person-type-control button:disabled {
    background-color: #e9ecef!important;
    color: #999;
    cursor: not-allowed;
}

.person-type-control .person-type-display {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    text-align: center;
    width: 30px;
}

/* Property selection START */

.selection-grid {
  display: grid;
  grid-gap: 1em;
  margin: 0 auto;
  max-width: 60em;
  padding: 0;

  /* Media query remains unchanged */
  @media (min-width: 42em) {
    grid-template-columns: repeat(2, 1fr);
  }
}

.selection-card {
  background-color: #fff;
  border-radius: 0.5em; 
  position: relative;
  cursor: pointer;
  
  /* Hover effect */
  &:hover {
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.15);
  }
}

.selection-radio {
  font-size: inherit;
  margin: 0;
  position: absolute;
  right: calc(1em + 2px); 
  top: calc(1em + 2px);  
}

@supports(-webkit-appearance: none) or (-moz-appearance: none) { 
  .selection-radio {
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff;
    border: 2px solid #e2ebf6; 
    border-radius: 50%;
    cursor: pointer;
    height: 1.5em; 
    outline: none;
    transition: 
      background 0.2s ease-out,
      border-color 0.2s ease-out;
    width: 1.5em; 

    &::after {
      border: 2px solid #fff;
      border-top: 0;
      border-left: 0;
      content: '';
      display: block;
      height: 0.75rem;
      left: 25%;
      position: absolute;
      top: 50%;
      transform: 
        rotate(45deg)
        translate(-50%, -50%);
      width: 0.375rem;
    }

    &:checked {
      background: var(--primary-color); 
      border-color: var(--primary-color); 
    }
  }
  
  .selection-card:hover .selection-radio {
    border-color: #c4d1e1; 
    
    &:checked {
      border-color: var(--primary-color); 
    }
  }
}

.selection-details {
  border: 2px solid #e2ebf6; 
  border-radius: 0.5em; 
  cursor: pointer;
  display: flex;
  flex-direction: column;
  padding: 1em; 
  transition: border-color 0.2s ease-out;
}

.selection-card:hover .selection-details {
  border-color: #c4d1e1;
}

.selection-radio:checked ~ .selection-details {
  border-color: var(--primary-color);
}

.selection-radio:focus ~ .selection-details {
  box-shadow: 0 0 0 2px #c4d1e1;
}

.selection-radio:disabled ~ .selection-details {
  color: #c4d1e1;
  cursor: default;
}

.selection-radio:disabled ~ .selection-details .selection-type-name {
  color: #c4d1e1; 
}

.selection-card:hover .selection-radio:disabled ~ .selection-details {
  border-color: #e2ebf6;
  box-shadow: none;
}

.selection-card:hover .selection-radio:disabled {
  border-color: #e2ebf6; 
}

.selection-type-name {
  color: var(--primary-color); 
  font-size: 1rem;
  line-height: 1em;
}

/* Additional styles for more details (optional) */
.selection-details .selection-cost {
  font-size: 2.5rem;
  font-weight: bold;
  padding: 0.5rem 0;
}

.selection-details .selection-slash {
  font-weight: normal;
}

.selection-details .selection-cycle {
  font-size: 2rem;
  font-variant: none;
  border-bottom: none;
  cursor: inherit;
  text-decoration: none;
}

.hidden-visually {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Property selection END */

/* Room General Styling */
/* Room Selection Container */
.rooms-selection {
    display: flex;
    flex-direction: column;
}

/* The container for each checkbox */
.room-container {
    display: block;
    position: relative;
    padding-left: 35px; /* Space for the custom checkmark */
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 1rem;
    color: #444;
    user-select: none;
}

/* Hide the browser's default checkbox */
.room-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create a custom checkbox */
.room-container .room-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    border: 2px solid #ddd;
    border-radius: 4px; /* Slightly rounded corners */
    transition: background-color 0.3s, border-color 0.3s;
}

/* On mouse-over, add a grey background color */
.room-container:hover .room-checkmark {
    background-color: #e7e7e7;
}

/* When the checkbox is checked, add a blue background */
.room-checkbox:checked ~ .room-checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);   
}

/* Create the checkmark/indicator (hidden when not checked) */
.room-container .room-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.room-checkbox:checked ~ .room-checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */
.room-container .room-checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Optional: Disabled State */
.room-checkbox:disabled ~ .room-checkmark {
    background-color: #f8f8f8;
    border-color: #ccc;
    cursor: not-allowed !important;
}

.room-checkbox:disabled ~ .room-checkmark:after {
    border-color: #aaa;
}

.room-container:disabled {
    color: #999;
    cursor: not-allowed !important;
}

/* Checkbox and Radio Buttons */
.wisebnb-booking-form form input[type="checkbox"],
.wisebnb-booking-form form input[type="radio"] {
    margin-right: 8px;
}

.wisebnb-booking-form form label input[type="checkbox"] + span,
.wisebnb-booking-form form label input[type="radio"] + span {
    font-size: 0.9rem;
    color: #333;
}

/* Sections */
.wisebnb-booking-form form h4, form h5 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #333;
}

.wisebnb-booking-form form p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

/* Guest Number Controls */
.person-type-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.person-type-control button {
    background-color: var(--primary-color);
    color: white;
    font-size: 1.2rem;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.person-type-control button:hover {
    background-color: #ddd;
}


/* Disabled State */
.person-type-control button:disabled {
    background-color: #f5f7f9;
    color: #999;
    border: 1px solid #ccc;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

/* Price Display */
.price-display {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    color: var(--primary-color);
    margin: 1rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    form {
        padding: 1.5rem;
    }

    form button[type="submit"] {
        font-size: 1rem;
        padding: 10px;
    }
}

.validation-error-modal {
    position: fixed; 
    top: 0; left: 0;
    width: 100vw; 
    height: 100vh;
    background: rgba(0, 0, 0, 0.5); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 9999; 
  }
  
  .validation-error-content {
    background: #fff;
    padding: 1.5rem;
    border-radius: 4px;
    max-width: 400px;
    width: 90%;
    position: relative;
  }
  
  /* Close button - top right corner */
  .modal-close-btn {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0.5rem;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
  }
  
  /* Simple fade-in animation (optional) */
  .validation-error-modal.fade-in {
    animation: fadeIn 0.2s forwards;
  }
  @keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

/* Services Checkbox */
.service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 1rem;
    cursor:pointer;
}

.service-item:last-child {
    border-bottom: none;
}

.service-label {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 0.5rem;
    cursor:pointer;
}

.service-checkbox {
    transform: scale(1.2);
    accent-color: var(--primary-color);
}

.service-name {
    white-space: nowrap;
    flex-shrink: 1;
}

/* The fixed width already solves the layout issue globally */
.service-quantity {
    width: 4rem !important; /* This overrides global input styles effectively */
    padding: 0.2rem;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 0.3rem;
    flex-shrink: 0;
    margin-left: auto;
}

.service-quantity:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 3px var(--primary-color);
}