/* Modal Overlay */
.dmc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(var(--secondBackground-rgb), 0.3);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: dmc-fade-in 0.3s ease-out;
  padding: 20px;
}

/* Animations */
@keyframes dmc-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dmc-slide-in {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes dmc-slide-out {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
}

/* Modal */
.dmc-main-card {
  padding: 1.875rem;
  border-radius: 1.25rem;
  background-color: color-mix(
    in srgb,
    var(--secondBackground) 60%,
    transparent 40%
  );
  animation: dmc-slide-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dmc-modal {
  background: var(--secondBackground);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 1rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  max-width: 28.125rem;
  width: 100%;
  position: relative;
  animation: dmc-slide-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dmc-modal-closing {
  animation: dmc-slide-out 0.3s ease-out;
}

/* Modal Header */
.dmc-modal-header {
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  position: relative;
}

.warning-dmc-modal-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin: 1.25rem auto 1.5rem;
  background: linear-gradient(135deg, var(--error), #e04c2b);
  transform: rotate(45deg);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(255, 86, 48, 0.3);
}

.warning-dmc-modal-icon svg {
  transform: rotate(-45deg);
  width: 2.325rem;
  height: 2.325rem;
  fill: #fff;
}

/* Outer light background circle */
.warning-dmc-modal-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5.625rem;
  height: 5.625rem;
  background: rgba(255, 86, 48, 0.08);
  border-radius: 50%;
  z-index: -2;
}

/* Middle layer circle */
.warning-dmc-modal-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4.25rem;
  height: 4.25rem;
  background: rgba(255, 86, 48, 0.15);
  border-radius: 50%;
  z-index: -1;
}

.question-dmc-modal-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin: 1.25rem auto 1.5rem;
  background: linear-gradient(135deg, var(--accent), #1e40af);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
}

.question-dmc-modal-icon svg {
  width: 2.125rem;
  height: 2.125rem;
  fill: #fff;
}

/* Outer light background circle */
.question-dmc-modal-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5.625rem;
  height: 5.625rem;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 50%;
  z-index: -2;
}

/* Middle layer circle */
.question-dmc-modal-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4.25rem;
  height: 4.25rem;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 50%;
  z-index: -1;
}

.warning-dmc-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--onSecondBackground);
  margin-bottom: 0.75rem;
  margin-top: 3.125rem;
  line-height: 1.3;
}

.question-dmc-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--onSecondBackground);
  margin-bottom: 0.75rem;
  margin-top: 3.125rem;
  line-height: 1.3;
}

.dmc-modal-subtitle {
  font-size: 1rem;
  color: var(--placeholder);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.dmc-modal-description {
  font-size: 0.938rem;
  color: var(--placeholderHover);
  line-height: 1.6;
}

/* Modal Body */
.dmc-modal-body {
  padding: 0 2rem;
}

.dmc-warning-box {
  background: var(--errorOn);
  border: 1px solid rgba(255, 86, 48, 0.2);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.dmc-warning-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.188rem;
  background: linear-gradient(90deg, var(--error), #e04c2b);
}

.dmc-warning-text {
  font-size: 0.875rem;
  color: #c53030;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.dmc-warning-icon {
  width: 1rem;
  height: 1rem;
  color: #c53030;
  flex-shrink: 0;
}

/* Modal Footer */
.dmc-modal-footer {
  padding: 1.5rem 1rem 1rem;
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Buttons */
.dmc-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.938rem;
  width: 100%;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
  font-family: inherit;
  text-transform: uppercase;
}

.dmc-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s;
}

.dmc-btn:hover::before {
  left: 100%;
}

.dmc-btn-cancel {
  background: var(--tertiary);
  color: var(--onTertiary);
  min-width: 6.25rem;
}

.dmc-btn-cancel:hover {
  background: var(--tertiaryHover);
  color: var(--onTertiaryHover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.dmc-btn-delete {
  background: linear-gradient(135deg, var(--error), #e04c2b);
  color: white;
  min-width: 6.25rem;
}

.dmc-btn-delete:hover {
  background: linear-gradient(135deg, #e04c2b, #cc3300);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 86, 48, 0.4);
}

.dmc-btn-delete:active {
  transform: translateY(0);
}

.dmc-btn-Clear {
  background: linear-gradient(135deg, var(--accent), #1e40af);
  color: white;
  min-width: 6.25rem;
}

.dmc-btn-Clear:hover {
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.dmc-btn-Clear:active {
  transform: translateY(0);
}

/* Close Button */
.dmc-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: var(--tertiary);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  color: var(--onTertiary);
}

.dmc-close-btn:hover {
  background: var(--tertiaryActive);
  opacity: 1;
  transform: rotate(90deg);
}

/* Responsive Design */
@media (max-width: 480px) {
  .dmc-modal {
    margin: 1.25rem;
    width: calc(100% - 40px);
  }

  .dmc-modal-header {
    padding: 1.5rem 1.5rem 1.25rem;
  }

  .dmc-modal-body {
    padding: 0 1.5rem;
  }

  .dmc-modal-footer {
    padding: 1.25rem 1.5rem 1.5rem;
    flex-direction: column;
  }

  .dmc-btn {
    width: 100%;
  }
}
