/* ===========================
   Enhanced SnTHostings Modal
=========================== */

.modal-overlay {
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 99999;
  padding: 20px;
  overflow-y: auto;
  opacity: 0;
  animation: fadeOverlay 0.3s ease forwards;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

/* --- Modal Box --- */
.modal-box {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  padding: 50px 45px 45px;
  width: 100%;
  max-width: 540px;
  animation: scaleIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  text-align: center;
}

/* --- Close Button --- */
.modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 26px;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  transition: color 0.25s ease;
}

.modal-close:hover {
  color: var(--cta);
}

/* --- Header Section --- */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

.modal-header img {
  width: 48px;
  height: 48px;
  opacity: 0.9;
  filter: drop-shadow(0 4px 8px rgba(255, 106, 0, 0.25));
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

/* --- Description --- */
.modal-box p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 25px;
  line-height: 1.6;
  text-align: center;
}

/* --- Form --- */
#customPlanForm {
  display: flex;
  flex-direction: column;
  text-align: center;
}

#customPlanForm label {
  font-weight: 700;
  color: #0b1b2b;
  font-size: 0.93rem;
}

#customPlanForm input,
#customPlanForm textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

#customPlanForm input:focus,
#customPlanForm textarea:focus {
  border-color: var(--cta);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.15);
  outline: none;
}

#customPlanForm textarea {
  resize: vertical;
  min-height: 100px;
}

#customPlanForm button[type="submit"] {
  margin-top: 10px;
  background: var(--cta);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 0;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 16px rgba(255, 106, 0, 0.25);
}

#customPlanForm button[type="submit"]:hover {
  background: var(--cta-hover);
  transform: translateY(-2px);
}

#customPlanResult {
  margin-top: 16px;
  font-weight: 600;
  text-align: center;
  color: var(--cta);
}

/* --- Animations --- */
@keyframes fadeOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .modal-box {
    padding: 35px 24px;
  }

  .modal-header {
    flex-direction: column;
    gap: 6px;
  }

  .modal-header img {
    width: 60px;
    height: 60px;
  }

  .modal-header h3 {
    font-size: 1.35rem;
  }
}
