/* ============================================
   HRVICO — Demo Booking Modal
   ============================================ */

.demo-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.demo-modal.active {
  display: flex;
}

.demo-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: modalFadeIn 0.3s ease;
}

.demo-modal__container {
  position: relative;
  background: #FFFFFF;
  border: 1px solid rgba(108, 63, 197, 0.1);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 540px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 0 60px rgba(108, 63, 197, 0.1),
    0 25px 50px rgba(0, 0, 0, 0.15);
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scrollbar styling */
.demo-modal__container::-webkit-scrollbar {
  width: 6px;
}
.demo-modal__container::-webkit-scrollbar-track {
  background: transparent;
}
.demo-modal__container::-webkit-scrollbar-thumb {
  background: rgba(108, 63, 197, 0.15);
  border-radius: 3px;
}

/* Close button */
.demo-modal__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(108, 63, 197, 0.06);
  border: 1px solid rgba(108, 63, 197, 0.1);
  color: var(--text-muted);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
}

.demo-modal__close:hover {
  background: rgba(108, 63, 197, 0.1);
  color: var(--text-primary);
  transform: rotate(90deg);
}

/* Header */
.demo-modal__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.demo-modal__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.demo-modal__logo-img,
.demo-modal__logo img {
  height: 36px !important;
  width: auto !important;
  display: block;
}

.demo-modal__logo-text {
  display: none;
}

.demo-modal__title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.demo-modal__subtitle {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-relaxed);
}

/* Form */
.demo-modal__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.demo-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-modal__field label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

.demo-modal__field input,
.demo-modal__field select,
.demo-modal__field textarea {
  width: 100%;
  padding: 12px 16px;
  background: #F8F9FC;
  border: 1px solid rgba(108, 63, 197, 0.12);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  transition: all var(--transition-fast);
  outline: none;
}

.demo-modal__field input::placeholder,
.demo-modal__field textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.demo-modal__field input:focus,
.demo-modal__field select:focus,
.demo-modal__field textarea:focus {
  border-color: var(--accent-purple);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(108, 63, 197, 0.08);
}

.demo-modal__field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.demo-modal__field select option {
  background: #FFFFFF;
  color: var(--text-primary);
}

.demo-modal__field textarea {
  resize: vertical;
  min-height: 80px;
}

.demo-modal__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* Submit button */
.demo-modal__submit {
  margin-top: var(--space-sm);
  width: 100%;
  justify-content: center;
}

/* Success State */
.demo-modal__success-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}

.demo-modal__success-icon {
  font-size: 3.5rem;
  margin-bottom: var(--space-lg);
  animation: successPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-modal__success-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.demo-modal__success-msg {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-sm);
}

.demo-modal__success-note {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

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

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes successPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Responsive */
@media (max-width: 600px) {
  .demo-modal__container {
    padding: var(--space-xl);
    margin: var(--space-md);
    max-height: 85vh;
  }

  .demo-modal__row {
    grid-template-columns: 1fr;
  }

  .demo-modal__title {
    font-size: var(--fs-xl);
  }
}
