.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--bg-card);
  backdrop-filter: blur(10px);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  width: 90%;
  max-width: 500px;
  padding: 2rem;
  position: relative;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
}

.modal-title i {
  margin-right: 0.75rem;
  color: var(--primary);
  font-size: 1.5rem;
}

.close-modal {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-modal:hover {
  color: var(--primary);
  transform: rotate(90deg);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  outline: none;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(61, 90, 254, 0.3);
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(45deg, var(--primary), #4f6fff);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
  z-index: -1;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(61, 90, 254, 0.5);
  transform: translateY(-3px);
}

.success-message {
  display: none;
  text-align: center;
  padding: 1rem;
  margin-top: 1rem;
  background-color: rgba(46, 213, 115, 0.2);
  border-radius: 0.5rem;
  border: 1px solid rgba(46, 213, 115, 0.3);
}

.success-message.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

/* Perbaikan styling untuk dropdown select */
.package-select {
  appearance: none;
  width: 100%;
  padding: 0.75rem 1rem;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  outline: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;

  /* Background arrow icon */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%233d5afe' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px 12px;
  padding-right: 2.5rem;
}

.package-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(61, 90, 254, 0.3), 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Styling untuk dropdown saat dibuka - ini membantu pada beberapa browser */
.package-select::-ms-expand {
  display: none;
}

/* Memastikan opsi dalam dropdown memiliki padding yang cukup */
.package-select option {
  padding: 12px 15px;
  background-color: #222;
  color: #fff;
  font-size: 0.95rem;
}

/* Style untuk opsi default */
.package-select option.default-option {
  background-color: #333;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  padding: 15px;
}

/* Style untuk header kategori */
.package-select option:disabled {
  background-color: #111 !important;
  color: var(--primary) !important;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  padding: 10px 15px;
  margin-top: 5px;
}

/* Meningkatkan kontras opsi yang dipilih */
.package-select option:checked,
.package-select option:hover,
.package-select option:focus {
  background-color: var(--primary);
  color: #fff;
}

/* Khusus untuk browser Webkit (Chrome, Safari) */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .package-select {
    padding-right: 2.5rem;
  }

  .package-select option {
    margin: 3px 0;
  }
}

/* Mengatasi tampilan dropdown di Firefox */
@-moz-document url-prefix() {
  .package-select {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  .package-select option {
    background-color: #222;
    color: #fff;
    padding: 10px;
  }
}

/* Responsif pada perangkat mobile */
@media (max-width: 767px) {
  .package-select {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
  }

  .package-select option {
    padding: 12px 15px;
  }

  .modal-content {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .package-select {
    font-size: 0.9rem;
    padding: 0.65rem 0.9rem;
  }

  .form-label {
    font-size: 0.85rem;
  }

  .modal-content {
    padding: 1.25rem;
  }
}

/* Animasi untuk pesan sukses */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Add this CSS to make dropdowns open upward */
.package-select-up {
  appearance: none;
  width: 100%;
  padding: 0.75rem 1rem;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  outline: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;

  /* Background arrow icon */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%233d5afe' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 4.86 2.451 10.342C1.885 10.987 2.345 12 3.204 12h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px 12px;
  padding-right: 2.5rem;
}

/* Focus state for the upward dropdown */
.package-select-up:focus {
  border-color: var(--primary);
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.15), 0 0 0 2px rgba(61, 90, 254, 0.3);
}

/* For older browsers - make sure dropdown appears above the select */
.select-wrapper {
  position: relative;
}

/* Positioning for Firefox, webkit browsers may still show dropdowns according to browser defaults */
@-moz-document url-prefix() {
  .package-select-up {
    direction: rtl; /* Hack for Firefox to show the dropdown upward */
  }
  .package-select-up option {
    direction: ltr;
  }
}

/* For Chrome, Safari and newer browsers that support the dialog element */
@supports selector(:has(dialog)) {
  .package-select-up {
    position: relative;
  }

  .package-select-up option {
    margin-bottom: 40px;
    position: relative;
  }
}
