/** Base overlay / modal */
.ptah-modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 48px 20px;
  z-index: 9999;
  overflow: auto;
}

.ptah-modal-overlay.active {
  display: flex;
}

.ptah-modal-box {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.35);

  display: flex;               /* NEW */
  flex-direction: column;      /* NEW */

  max-height: 92vh;
  overflow: hidden;            /* IMPORTANT — no scrolling here */
}

.ptah-modal-body {
  flex: 1 ;
  overflow: auto;
  padding: 20px;

  border-radius: 0 0 16px 16px; /* Only bottom corners */
}
.ptah-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 18px 20px;

  background: #fef9f2;  
  border-bottom: 1px solid rgba(0,0,0,0.06);

  border-radius: 6px 6px 0 0;  /* Only top corners */
}

.ptah-modal-header h2 {
  margin: 0;
  font-size: 23px;
}

.ptah-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}


.ptah-modal-trigger {
  margin-bottom: 10px;
}

.ptah-modal-hidden {
  display: none !important;
}

/** Side panel mode */
.ptah-modal-overlay.sidepanel {
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
}

.ptah-modal-overlay.sidepanel.left {
  justify-content: flex-start;
}

.ptah-modal-overlay.sidepanel .ptah-modal-box {
  height: 100vh;
  max-height: none;
  border-radius: 0;
  max-width: 520px;
}

/** Mobile fullscreen option */
@media (max-width: 640px) {
  .ptah-modal-overlay.mobile-fullscreen {
    padding: 0;
    align-items: stretch;
  }
  .ptah-modal-overlay.mobile-fullscreen .ptah-modal-box {
    height: 100vh;
    max-height: none;
    border-radius: 0;
    max-width: none !important;
  }
}

/** Animations */
.ptah-modal-overlay.fade.active .ptah-modal-box { animation: ptahFadeIn .22s ease; }
.ptah-modal-overlay.slide_up.active .ptah-modal-box { animation: ptahSlideUp .28s ease; }
.ptah-modal-overlay.slide_down.active .ptah-modal-box { animation: ptahSlideDown .28s ease; }
.ptah-modal-overlay.scale.active .ptah-modal-box { animation: ptahZoomIn .22s ease; }
.ptah-modal-overlay.rotate.active .ptah-modal-box { animation: ptahRotateIn .28s ease; }
.ptah-modal-overlay.flip.active .ptah-modal-box { animation: ptahFlipIn .32s ease; }
.ptah-modal-overlay.blur.active .ptah-modal-box { animation: ptahBlurIn .30s ease; }
.ptah-modal-overlay.sheet.active .ptah-modal-box { animation: ptahSheetUp .30s ease; }

/** Side panel specific animation */
.ptah-modal-overlay.sidepanel.right.active .ptah-modal-box { animation: ptahPanelRight .26s ease; }
.ptah-modal-overlay.sidepanel.left.active .ptah-modal-box { animation: ptahPanelLeft .26s ease; }

@keyframes ptahFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ptahSlideUp { from { transform: translateY(36px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ptahSlideDown { from { transform: translateY(-36px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ptahZoomIn { from { transform: scale(.90); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ptahRotateIn { from { transform: rotate(-6deg) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ptahFlipIn { from { transform: rotateY(70deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ptahBlurIn { from { filter: blur(10px); transform: scale(.98); opacity: 0; } to { filter: none; transform: none; opacity: 1; } }
@keyframes ptahSheetUp { from { transform: translateY(55vh); opacity: 0.7; } to { transform: none; opacity: 1; } }
@keyframes ptahPanelRight { from { transform: translateX(18px); opacity: 0.8; } to { transform: none; opacity: 1; } }
@keyframes ptahPanelLeft { from { transform: translateX(-18px); opacity: 0.8; } to { transform: none; opacity: 1; } }

/** Preview helper */
.ptah-admin-modals-preview-wrap .ptah-modal-overlay {
  border-radius: 12px;
}


/* additions */

[data-ptah-modal="RSVP Settings"] legend.fieldset__legend.fieldset__legend--visible {
    display: none;
}

[data-ptah-modal="RSVP Settings"] .ief-form.ief-form-bottom .fieldset__wrapper {
    margin-block-end: 0;
    margin: 0;
}

[data-ptah-modal="RSVP Settings"] fieldset {
    border: 0;
    margin: 0;
}

[data-ptah-modal="RSVP Settings"] .ief-form.ief-form-bottom {
    margin: 0 15px;
    border: 0;
}

[data-ptah-modal="RSVP Settings"] tr.ief-row-entity.ief-row-entity-form, [data-ptah-modal="RSVP Settings"] th.th__operations, [data-ptah-modal="RSVP Settings"] .th__title {
    display: none;
}

[data-ptah-modal="RSVP Settings"] .ief-entity-table .ief-row-form, [data-ptah-modal="RSVP Settings"] th {
    border: 0;
}

[data-ptah-modal="RSVP Settings"] table tbody tr {
    border-block-end: 0px solid var(--gin-border-color-table);
}


[data-ptah-modal="RSVP Settings"] .layer-wrapper.gin-layer-wrapper {
    box-shadow: none;
    border: 0!important;
    padding: 0;
}

[data-ptah-modal="RSVP Settings"] table * {
    background: #fff!important;
    border: 0!important;
}

[data-ptah-modal="RSVP Settings"] table#ief-entity-table-edit-field-food-menu-entities {
    margin-bottom: 0;
}