.my-modal {
  display: none;
  z-index: 9999;
}

.my-modal-wrapper {
  position: relative;
}

/* Main Modal Overlay */
.my-modal:not(.my-mini-modal) {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  padding: 32px 20px;
  background: rgba(14, 23, 39, 0.18);
  backdrop-filter: none;
}

/* Main Modal Content Box */
.my-modal:not(.my-mini-modal) .my-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(80%, 760px);
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 32px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
  border: 1px solid rgba(148, 163, 184, 0.28);

  /* Hide scrollbar for Chrome, Safari and Opera */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.my-modal:not(.my-mini-modal) .my-modal-content::-webkit-scrollbar {
  display: none;
}

.my-modal-content {
  background: #fff;
  padding: 24px;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
  position: relative;
  color: #0f172a;
}

.my-modal-content h3 {
  margin: 0 40px 14px 0;
  font-size: clamp(1.25rem, 1.7vw, 1.65rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.my-modal-description {
  color: #334155;
  line-height: 1.7;
}

.my-modal-description > *:first-child {
  margin-top: 0;
}

.my-modal-description > *:last-child {
  margin-bottom: 0;
}

.my-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #475569;
  background: rgba(241, 245, 249, 0.96);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.my-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: scale(1.05);
}

.my-modal-trigger {
  cursor: pointer;
  max-width: 100%;
}

.my-modal-wrapper,
.my-modal-wrapper * {
  box-sizing: border-box;
}

.my-mini-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  padding: 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.01) 0%, rgba(15, 23, 42, 0.08) 100%);
}

.my-modal.my-modal-bg-blur:not(.my-mini-modal) {
  background: rgba(14, 23, 39, 0.38);
  backdrop-filter: blur(8px);
}

.my-modal.my-modal-bg-blur.my-mini-modal {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 0%, rgba(15, 23, 42, 0.22) 100%);
  backdrop-filter: blur(8px);
}

@keyframes slideUp {
  from {
    transform: translate(-50%, 100%);
  }

  to {
    transform: translate(-50%, 0);
  }
}

.my-mini-modal .my-modal-content {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(50%, 720px);
  height: auto;
  max-height: 80vh;
  animation: slideUp 0.4s ease-out forwards;
  border-radius: 28px 28px 0 0;
  margin: 0;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 -18px 50px rgba(15, 23, 42, 0.16);
}

.my-modal-preview-badge,
.my-modal-trigger-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 7px 12px;
}

.my-modal-preview-badge {
  margin-bottom: 14px;
}

.my-modal-trigger-hint {
  margin-top: 18px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 500;
}

.my-modal-open {
  overflow: hidden;
}

@keyframes slideUpMobile {
  from {
    transform: translate(0, 100%);
  }

  to {
    transform: translate(0, 0);
  }
}

@media (max-width: 767px) {
  .my-modal:not(.my-mini-modal) .my-modal-content {
    width: 90%;
    padding: 24px;
  }

  .my-mini-modal .my-modal-content {
    width: 100%;
    left: 0;
    bottom: 0;
    transform: none;
    animation: slideUpMobile 0.4s ease-out forwards;
    border-radius: 24px 24px 0 0;
    max-height: 90vh;
  }

  .my-mini-modal {
    padding: 12px;
  }
}

.my-modal-editor-card {
  min-height: 168px;
  width: 100%;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.my-modal-editor-card-main {
  border-top: 4px solid #0f766e;
}

.my-modal-editor-card-mini {
  border-top: 4px solid #0369a1;
}

.my-modal-editor-title {
  margin: 0;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 52px;
}

.my-modal-editor-card .my-modal-trigger-hint {
  width: fit-content;
  max-width: 100%;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
