:root {
  --main-color: #394933;
  --secondary-color: #394933;
}

/* default (desktop/tablet) */
.header-logo img {
  height: 48px; /* whatever your normal height is */
  transition: height 0.2s;
}

/* mobile only */
@media (max-width: 575.98px) {
  .header-logo img {
    height: 32px; /* your mobile height */
  }
}

.addon-line {
  gap: 0.25rem;
}
.addon-label {
  flex: 1 1 auto;
}
.addon-controls {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Global style for all input fields */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
textarea,
select {
  background-color: transparent !important; /* No background */
  border: none !important; /* Remove all borders */
  border-bottom: 2px solid lightgray !important; /* Bottom border (underline) */
  color: #242424 !important; /* Light grey text color */
  outline: none; /* Remove default focus outline */
  width: 100%; /* Full width */
  padding: 10px 5px; /* Padding for some spacing */
  font-size: 16px; /* Adjust font size */
  transition: border-color 0.3s ease, color 0.3s ease; /* Smooth transition */
}

/* Focus state - change the underline to the main color and keep the same visual */
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-bottom-color: var(--main-color) !important; /* Change the underline to main color on focus */
  color: #7c7c7c !important; /* Keep light grey text color */
}

/* When text is entered, keep the same visual but the bottom border colored */
input:not(:placeholder-shown):not(:focus),
textarea:not(:placeholder-shown):not(:focus),
select:not(:focus) {
  background-color: transparent !important; /* Ensure no background color */
  border-bottom: 2px solid var(--main-color) !important; /* Bottom border remains colored */
  color: #777777 !important; /* Keep light grey text color */
}

/* Optional: Customize placeholder text color */
::placeholder {
  color: #242424 !important; /* Placeholder text color */
  opacity: 1; /* Ensure it's not faded */
}

.form-container {
  padding: 20px;
  border-radius: 8px;
  box-sizing: border-box;
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
}

.form-container h2 {
  color: white;
  text-align: center;
  margin-bottom: 20px;
}

.form-container .form-control {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  border: none;
}

.form-container .btn-submit {
  width: 100%;
  padding: 10px;
  border-radius: 5px;
  background-color: var(--main-color);
  color: white;
  border: none;
  cursor: pointer;
}

.form-container .btn-submit:hover {
  background-color: var(--secondary-color);
}

/* Style for the radio buttons */
input[type="radio"] {
  appearance: none; /* Remove default radio button styling */
  opacity: 0; /* Make the radio input invisible but functional */
  position: relative;
  cursor: pointer;
  width: 20px; /* Width of the clickable area */
  height: 20px; /* Height of the clickable area */
  margin-right: 25px; /* Space between radio and label */
}

input[type="radio"] + label {
  position: relative;
  padding-left: 30px; /* Space for the custom radio button */
  cursor: pointer;
  vertical-align: middle; /* Align label text with the custom radio button */
}

input[type="radio"] + label:before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-color: transparent; /* Transparent background */
  border: 2px solid #ccc; /* Light grey border */
  border-radius: 50%; /* Make it circular */
  transition: border-color 0.3s ease, background-color 0.3s ease; /* Smooth transition */
}

/* Style when the radio button is selected */
input[type="radio"]:checked + label:before {
  background-color: var(--main-color); /* Fill background with main color when selected */
  border-color: var(--main-color); /* Change border color when selected */
}

/* Label style to align with radio button */
.mb-3 label {
  font-size: 14px;
  font-weight: normal;
  color: #fff; /* Adjust color based on your theme */
  display: inline-block;
  vertical-align: middle; /* Ensure the label is vertically aligned with custom radio button */
}

/* Hover effect for custom radio buttons */
input[type="radio"] + label:before:hover {
  border-color: var(--main-color); /* Change border color on hover */
}

/* Adjust spacing between questions */
.mb-3 div {
  margin-bottom: 15px; /* Spacing between each radio button and label group */
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

input:checked + .slider {
  background-color: var(--main-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Optional: adds shadows to the slider */
.slider:active:before {
  width: 30px;
}

.custom-file-input {
  opacity: 0;
  position: absolute;
  z-index: -1;
}

/* Style the custom file input label */
.custom-file-label {
  display: inline-block;
  background-color: transparent;
  color: var(--main-color);
  /* Define your main color here */
  padding: 10px;
  cursor: pointer;
  font-size: 16px;
  border: 2px dashed var(--main-color);
  border-radius: 5px;
  text-align: center;
}

/* Icon styling */
.custom-file-label i.fa-download {
  margin-right: 5px;
}

/* Preview styling */
#photosPreview img {
  width: 30%;
  margin: 5px;
}

/* Dropdown Menu Styling */
select.form-select {
  background-color: var(--secondary-color);
  color: #fff;
  border: 1px solid var(--main-color);
  padding: 12px 15px;
  font-size: 9px; /* Slightly larger font for readability */
  border-radius: 4px;
  appearance: none;
  cursor: pointer;
  line-height: 2.5; /* Increased line height for extra spacing */
}

select.form-select option {
  background-color: var(--tertiary-color);
  color: #fff;
  font-size: 18px; /* Match dropdown font size */
  line-height: 2.5 !important; /* Simulate extra spacing */
}

/* Optional Scrollbar Styling for Webkit Browsers */
select.form-select::-webkit-scrollbar {
  width: 12px;
}

select.form-select::-webkit-scrollbar-track {
  background: var(--secondary-color);
}

select.form-select::-webkit-scrollbar-thumb {
  background-color: var(--main-color);
  border-radius: 6px;
  border: 3px solid var(--tertiary-color);
}

select.form-select::-webkit-scrollbar-thumb:hover {
  background-color: var(--main-color);
}

.old-price {
  opacity: 0.5; /* 50 % transparency */
  text-decoration: line-through;
  margin-right: 4px;
}

.btn-variant.active,
.btn-variant.active:hover,
.btn-variant.active:focus {
  background-color: #000; /* fond noir */
  color: #fff; /* texte blanc */
  border-color: #000; /* bordure assortie */
}

/* prix caché avant sélection / addons */
.price[hidden] {
  display: none !important;
}
/* bouton (packages & figurines) inactif tant que rien n’est sélectionné */
.ct-product-button:disabled,
.ct-product-button.disabled {
  pointer-events: none;
  opacity: 0.45;
}
/* style actif du bouton-variant (déjà demandé) */
.btn-variant.active,
.btn-variant.active:hover,
.btn-variant.active:focus {
  background: #000;
  border-color: #000;
  color: #fff;
}

/* Empêche l'I-beam/caret et favorise le clic */
.input-date {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  caret-color: transparent;
}

/* Curseur main aussi sur l’icône calendrier */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

.input-date {
  cursor: pointer;
  user-select: none;
  caret-color: transparent;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

/* Scope to product forms only */
#terrain-form .form-control,
#party-form .form-control {
  font-size: 14px; /* smaller text */
  line-height: 1.35;
  height: auto; /* let padding control height */
  padding: 6px 10px; /* tighter padding */
}

#terrain-form .form-label,
#party-form .form-label {
  font-size: 14px; /* match inputs */
  line-height: 1.35;
}

/* Make sure <option> follows the select's font-size on all browsers */
#terrain-form .form-control option,
#party-form .form-control option {
  font-size: inherit;
}

/* Buttons in those forms, so the CTAs don’t look oversized next to smaller selects */
#terrain_add_btn,
#party_add_btn {
  font-size: 14px;
  padding: 8px 14px;
}

/* Slightly smaller on very small screens if you want it extra compact */
@media (max-width: 480px) {
  #terrain-form .form-control,
  #party-form .form-control,
  #terrain-form .form-label,
  #party-form .form-label,
  #terrain_add_btn,
  #party_add_btn {
    font-size: 13px;
  }
}

.icon-margin {
  margin-right: 10px;
}

/* Select inside the create projet modal */
.projet-modal .form-select {
  background-color: var(--main-color);
  color: #fffdf5;
  border-color: var(--main-color);
}

.projet-modal .form-select:focus {
  box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.1);
  border-color: var(--main-color);
}

/* Options in dropdown (works on most browsers, but select rendering is partly native) */
.projet-modal .form-select option {
  background-color: var(--main-color);
  color: #fffdf5;
}

/* File input browse button */
.projet-modal input[type="file"]::file-selector-button {
  background-color: var(--main-color);
  color: #fffdf5;
  border: 1px solid var(--main-color);
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

/* WebKit fallback (Safari / older Chromium) */
.projet-modal input[type="file"]::-webkit-file-upload-button {
  background-color: var(--main-color);
  color: #fffdf5;
  border: 1px solid var(--main-color);
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

/* WebKit fallback (Safari / older Chromium) */
.projet-update input[type="file"]::-webkit-file-upload-button {
  background-color: var(--main-color);
  color: #fffdf5;
  border: 1px solid var(--main-color);
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  cursor: pointer;
}
