/* =============================================================================
   DIMAQ — Confirmation modal styles
   Overlay + centered dialog card. Zgodne z Figmą.
   ========================================================================== */

.dimaq-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 17, 17, 0.5);
  opacity: 0;
  transition: opacity 180ms ease;
}

.dimaq-modal-overlay--visible {
  opacity: 1;
}

.dimaq-modal-overlay--leaving {
  opacity: 0;
}

/* Blokada scrolla pod modalem */
body.dimaq-modal-open {
  overflow: hidden;
}

/* =============================================================================
   Modal card
   ========================================================================== */

.dimaq-modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
  font-family: "Fira Sans", sans-serif;
  transform: scale(0.96);
  transition: transform 180ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.dimaq-modal-overlay--visible .dimaq-modal {
  transform: scale(1);
}

/* -----------------------------------------------------------------------------
   Close button (x w prawym górnym rogu)
   -------------------------------------------------------------------------- */

.dimaq-modal__close {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dimaq-gray05, #F5F5F5);
  border: none;
  border-radius: 50%;
  color: var(--dimaq-gray100, #212121);
  cursor: pointer;
  transition: background 120ms ease;
}

.dimaq-modal__close svg {
  width: 18px;
  height: 18px;
}

.dimaq-modal__close:hover {
  background: var(--dimaq-gray10, #E0E0E0);
}

.dimaq-modal__close:focus-visible {
  outline: 2px solid var(--dimaq-primary50, #EF1800);
  outline-offset: 2px;
}

/* -----------------------------------------------------------------------------
   Body
   -------------------------------------------------------------------------- */

.dimaq-modal__body {
  padding: 32px 32px 24px 32px;
}

.dimaq-modal__title {
  margin: 0 56px 12px 0;   /* prawy margin robi miejsce na x — desc ma taki sam, żeby zawijały się tak samo */
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--dimaq-gray100, #212121);
}

.dimaq-modal__desc {
  margin: 0 56px 0 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--dimaq-gray80, #424242);
}

/* -----------------------------------------------------------------------------
   Actions row
   -------------------------------------------------------------------------- */

.dimaq-modal__actions {
  display: flex;
  gap: 12px;
  padding: 20px 24px 24px 24px;
  border-top: 1px solid var(--dimaq-gray10, #E0E0E0);
}

.dimaq-modal__btn {
  flex: 1;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.dimaq-modal__btn:focus-visible {
  outline: 2px solid var(--dimaq-primary50, #EF1800);
  outline-offset: 2px;
}

/* Cancel (biały outline) */
.dimaq-modal__btn--cancel {
  background: #fff;
  color: var(--dimaq-gray100, #212121);
  border-color: var(--dimaq-gray100, #212121);
}

.dimaq-modal__btn--cancel:hover {
  background: var(--dimaq-gray05, #F5F5F5);
}

/* Confirm — default (primary) */
.dimaq-modal__btn--confirm.dimaq-modal__btn--default {
  background: var(--dimaq-gray100, #212121);
  color: #fff;
  border-color: var(--dimaq-gray100, #212121);
}

.dimaq-modal__btn--confirm.dimaq-modal__btn--default:hover {
  background: var(--dimaq-gray80, #424242);
  border-color: var(--dimaq-gray80, #424242);
}

/* Confirm — danger (czerwony, dla akcji destrukcyjnych) */
.dimaq-modal__btn--confirm.dimaq-modal__btn--danger {
  background: var(--dimaq-alert50, #EF1800);
  color: #fff;
  border-color: var(--dimaq-alert50, #EF1800);
}

.dimaq-modal__btn--confirm.dimaq-modal__btn--danger:hover {
  background: var(--dimaq-alert100, #C21500);
  border-color: var(--dimaq-alert100, #C21500);
}

/* =============================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
  .dimaq-modal__body {
    padding: 24px 20px 20px 20px;
  }

  .dimaq-modal__title {
    font-size: 18px;
    margin-right: 44px;
  }

  .dimaq-modal__desc {
    font-size: 14px;
    margin-right: 44px;
  }

  .dimaq-modal__actions {
    padding: 16px 20px 20px 20px;
    flex-direction: column-reverse;   /* Confirm nad Cancel na mobile */
    gap: 8px;
  }

  .dimaq-modal__close {
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
  }
}
