.ticket-submit-dialog,
.ticket-edit-dialog {
  position: fixed;
  inset: 50% auto auto 50%;
  width: min(920px, calc(100vw - 36px));
  max-width: none;
  height: auto;
  max-height: calc(100dvh - 36px);
  margin: 0;
  padding: 0;
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid #d8d8d8;
  border-radius: 12px;
  background: #fff;
  color: #111;
  box-shadow: 0 24px 80px #0005;
}

.ticket-submit-dialog::backdrop,
.ticket-edit-dialog::backdrop { background: #1119; }

.ticket-confirmation-dialog {
  position: fixed;
  inset: 50% auto auto 50%;
  width: min(420px, calc(100vw - 32px));
  max-width: none;
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 1px solid #d8e4dc;
  border-radius: 14px;
  background: #fff;
  color: #111;
  box-shadow: 0 24px 80px #0004;
}
.ticket-confirmation-dialog::backdrop { background: #1119; }
.ticket-confirmation-content { display: grid; gap: 12px; padding: 28px; text-align: center; }
.ticket-confirmation-icon { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto; border-radius: 50%; background: #e6f4eb; color: #177245; font-size: 24px; font-weight: 700; }
.ticket-confirmation-content h2 { margin: 0; font-size: 21px; }
.ticket-confirmation-content p { margin: 0; line-height: 1.5; }
.ticket-confirmation-note { color: #8a4a00; font-size: 13px; }
.ticket-confirmation-content button { justify-self: center; min-width: 110px; margin-top: 8px; padding: 10px 18px; border: 0; border-radius: 8px; background: #111; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.ticket-confirmation-content button:focus-visible { outline: 3px solid #1b63c6; outline-offset: 3px; }

.ticket-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid #ddd;
  background: #fff;
}

.ticket-dialog-header h2 { margin: 0; color: #111; font-size: 19px; }
.ticket-dialog-header p { margin: 4px 0 0; color: #666; font-size: 12px; }

.ticket-submit-frame {
  display: block;
  width: 100%;
  height: 620px;
  max-height: calc(100dvh - 110px);
  border: 0;
  background: #fff;
}

.ticket-edit-dialog {
  inset: 0 0 0 auto;
  width: min(480px, 100vw);
  height: 100dvh;
  max-height: 100dvh;
  overflow: auto;
  transform: none;
  border-radius: 12px 0 0 12px;
}

.ticket-edit-dialog .ticket-dialog-header { align-items: flex-start; }
.ticket-edit-dialog .ticket-edit-form { display: grid; gap: 14px; padding: 20px; overflow: auto; max-height: calc(100dvh - 82px); }
.ticket-edit-dialog .ticket-edit-form[hidden] { display: none; }
.ticket-edit-side-button { display: block; margin: 18px 0 0 auto; }

.ticket-submit-embed,
.ticket-submit-embed.ticketing-page { min-height: 0; height: auto; background: #fff; color: #111; }
.ticket-submit-embed .ticketing-shell { max-width: none; min-height: 0; padding: 12px 16px; }
.ticket-submit-embed .ticketing-header { display: none; }
.ticket-submit-embed .ticketing-grid { display: block; }
.ticket-submit-embed #ticket-submit { max-width: 850px; margin: 0 auto; padding: 12px 18px 16px; border: 0; box-shadow: none; }
.ticket-submit-embed #submit-title,
.ticket-submit-embed #ticket-submit > .page-card-kicker,
.ticket-submit-embed #ticket-submit > .ticket-help { display: none; }
.ticket-submit-embed .ticket-form { gap: 10px 14px; }
.ticket-submit-embed .ticket-form > label:not(.full) { max-width: none; }
.ticket-submit-embed .ticket-form > label:not(.full) select { min-height: 40px; height: 40px; }
.ticket-submit-embed .ticket-form textarea { min-height: 88px; }
.ticket-submit-embed .ticket-form .ticket-actions { position: sticky; z-index: 2; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 0 -18px; padding: 11px 18px 4px; border-top: 1px solid #e5e5e5; background: #fff; }
.ticket-submit-embed #ticket-form-status { order: -1; margin-right: auto; }

@media (max-width: 650px) {
  .ticket-submit-dialog { inset: 50% auto auto 50%; width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 10px; }
  .ticket-submit-frame { height: 700px; max-height: calc(100dvh - 74px); }
  .ticket-edit-dialog { inset: 0; width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .ticket-dialog-header { padding: 12px 14px; }
  .ticket-submit-embed .ticketing-shell { padding: 6px; }
  .ticket-submit-embed #ticket-submit { padding: 8px 10px; }
  .ticket-submit-embed .ticket-form .ticket-actions { margin: 0 -10px; padding: 10px 10px 4px; }
  .ticket-submit-embed .ticket-form { grid-template-columns: 1fr; }
  .ticket-submit-embed .ticket-form .full { grid-column: auto; }
}
