#age-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.age-gate-box {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  width: 40vw;
  max-width: 600px;
  transform: scale(0.8);
  opacity: 0;
  animation: fadeZoomIn 0.5s ease forwards;
  text-align: center;
  overflow: visible;
}

.age-gate-box h3,
.age-gate-box select,
.age-gate-box button,
.age-gate-box input[type="number"],
.age-gate-box label,
.age-gate-box p {
  margin: 1rem 0;
}

.age-gate-logo {
  max-width: 150px;
  margin-bottom: 1rem;
}

.age-gate-option {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.age-gate-option button {
  flex: 1 1 50%;
  padding: 16px 24px;
  text-align: center;
  border-radius: 8px;
  border: 2px solid #000;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  transition: background-color 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.age-gate-option button:hover,
.age-gate-option button.active {
  background-color: #000;
  color: #fff;
}

#submit-age-gate {
  width: 100%;
  padding: 16px 24px;
  text-align: center;
  border-radius: 8px;
  border: 2px solid #000;
  background: transparent;
  cursor: pointer;
  margin-top: 1rem;
  line-height: 1;
  transition: background-color 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#submit-age-gate:hover {
  background-color: #000;
  color: #fff;
}

.age-gate-box label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 1rem 0;
  font-size: 1rem;
}

#remember-choice {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid #000;
  border-radius: 2px;
  background-color: #fff;
  margin: 0;
  padding: 0;
  position: relative;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
}

#remember-choice:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 9px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

#age-gate-region {
  width: 100%;
  padding: 16px 24px;
  font-size: 1rem;
  border: 2px solid #000;
  border-radius: 8px;
  background-color: #fff !important;
  color: #000 !important;
  cursor: pointer;
  margin: 1rem 0;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  z-index: 10000;
  position: relative;
  line-height: 1;
  transition: background-color 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#age-gate-region option {
  background-color: #fff !important;
  color: #000 !important;
  padding: 10px;
}

select#age-gate-region::-webkit-scrollbar {
  display: none;
}

@media (max-width: 768px) {
  .age-gate-box {
    width: 90vw !important;
  }
}

@keyframes fadeZoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-options {
  list-style: none;
  margin: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 2px solid #000;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  z-index: 9999;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

.custom-options.show {
  max-height: 200px;
  opacity: 1;
}

.custom-options li {
  padding: 14px 20px;
  cursor: pointer;
  background-color: #fff;
  color: #000;
  margin: 0;
  transition: background-color 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.custom-options li:hover {
  background-color: #000;
  color: #fff;
}

.custom-options li.selected {
  background-color: #000;
  color: #fff;
  font-weight: bold;
}

#age-gate-disclaimer {
  font-size: 12px;
}

#age-input {
  width: 100%;
  padding: 16px 24px;
  text-align: center;
  border-radius: 8px;
  border: 2px solid #000;
  background: transparent;
  color: #000;
  font-size: 1rem;
  margin: 1rem 0;
  transition: background-color 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#age-input::placeholder {
  color: #aaa;
  text-align: center;
}

#age-input:focus {
  outline: none;
  border-color: #000;
  background-color: #fff;
}

#region-arrow, .region-arrow {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.3s ease;
  margin-left: 10px;
}

/* Quando il menu è aperto */
.custom-select.open .region-arrow {
  transform: rotate(180deg);
}
