/* Prevent body scroll */
body.rmodal-open {
  overflow: hidden;
}

/* Backdrop */
.rmodal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.rmodal-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Modal Container */
.rmodal-container {
  position: fixed;
  z-index: 10001;
  /*background: #ffffff;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);*/
  display: flex;
  flex-direction: column;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.rmodal-container.is-visible {
  pointer-events: auto;
  opacity: 1;
}

.rmodal-handle-bar {
  display: none;
  width: 36px;
  height: 5px;
  background-color: #cbd5e1;
  border-radius: 9999px;
  margin: 12px auto 4px auto;
}

/* Desktop View (> 768px) */
@media (min-width: 769px) {
  .rmodal-container {
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    /*border: 1px solid #e2e8f0;*/
    transform: translate(-50%, -46%) scale(0.96);
  }

  .rmodal-container.is-visible {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Mobile View (<= 768px) */
@media (max-width: 768px) {
  .rmodal-handle-bar {
    display: block;
  }

  .rmodal-container {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 85vh;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    transform: translateY(100%);
  }

  .rmodal-container.is-visible {
    transform: translateY(0);
  }
}

/* Elements */
.rmodal-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rmodal-title {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

.rmodal-btn-close {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rmodal-btn-close:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.rmodal-body {
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
}

.rmodal-footer {
  padding: 16px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

.rmodal-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  border: none;
}

.rmodal-btn-secondary {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
}

.rmodal-btn-secondary:hover {
  background: #f8fafc;
}

.rmodal-btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.rmodal-btn-primary:hover {
  background: #1d4ed8;
}