/* Shared new-ticket composer for dashboard and standalone support center. */
body.dashboard-page .ticket-modal {
  width: min(720px,calc(100% - 32px));
  max-height: min(860px,calc(100dvh - 32px));
  box-sizing: border-box;
  padding: 0;
  overflow: auto;
  border: 1px solid #3a3e42;
  border-radius: 24px;
  background: #17191b;
  color: #f7f8f9;
  box-shadow: 0 36px 100px rgb(0 0 0 / 72%),0 0 0 1px rgb(255 255 255 / 3%) inset;
}

body.dashboard-page .ticket-modal::backdrop {
  background: rgb(4 6 8 / 82%);
  backdrop-filter: blur(10px);
}

body.dashboard-page .ticket-modal form {
  position: relative;
  box-sizing: border-box;
  padding: 28px;
}

body.dashboard-page .ticket-modal form::before {
  position: absolute;
  top: 0;
  right: 32px;
  left: 32px;
  height: 2px;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(90deg,transparent,#83cddd 30%,#a7e6d4 70%,transparent);
  content: "";
  opacity: .85;
}

body.dashboard-page .ticket-modal .modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: -28px -28px 26px;
  padding: 30px 28px 24px;
  border-bottom: 1px solid #303438;
  background: linear-gradient(145deg,#202427 0%,#1a1d1f 70%);
}

body.dashboard-page .ticket-modal .modal-head > div {
  min-width: 0;
}

body.dashboard-page .ticket-modal .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: #89cfdb;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

body.dashboard-page .ticket-modal .eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #79c9d8;
  box-shadow: 0 0 0 4px rgb(121 201 216 / 12%);
  content: "";
}

body.dashboard-page .ticket-modal .modal-head h2 {
  margin: 0;
  color: #f8f9fa;
  font-size: clamp(20px,3vw,25px);
  font-weight: 850;
  line-height: 1.5;
}

body.dashboard-page .ticket-modal .modal-head p {
  margin: 5px 0 0;
  color: #929aa1;
  font-size: 11px;
  line-height: 1.9;
}

body.dashboard-page .ticket-modal .close-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  padding: 0;
  border: 1px solid #40464b;
  border-radius: 12px;
  background: #292d30;
  color: #dce1e4;
  box-shadow: 0 1px 0 rgb(255 255 255 / 5%) inset;
  font: 300 23px/1 Arial,sans-serif;
  cursor: pointer;
  transition: border-color .18s ease,background .18s ease,transform .18s ease;
}

body.dashboard-page .ticket-modal .close-button:hover {
  border-color: #626a70;
  background: #34393d;
  transform: translateY(-1px);
}

body.dashboard-page .ticket-modal .ticket-field {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  color: #d8dde0;
}

body.dashboard-page .ticket-modal .ticket-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: 2px;
  color: #d9dddf;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.6;
  transition: color .18s ease;
}

body.dashboard-page .ticket-modal .ticket-field-label small {
  color: #747d84;
  font-size: 9px;
  font-weight: 500;
}

body.dashboard-page .ticket-modal .ticket-field:focus-within .ticket-field-label {
  color: #96d5df;
}

body.dashboard-page .ticket-modal :is(input:not([type=file]),select,textarea) {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid #3c4247;
  border-radius: 13px;
  outline: 0;
  background: #0f1316;
  color: #f3f6f7;
  caret-color: #8ed5e1;
  box-shadow: 0 1px 0 rgb(255 255 255 / 3%) inset,0 8px 20px rgb(0 0 0 / 10%);
  font: 600 12px/1.8 Vazirmatn,Tahoma,sans-serif;
  transition: border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease;
}

body.dashboard-page .ticket-modal :is(input:not([type=file]),select) {
  min-height: 54px;
  padding: 0 16px;
}

body.dashboard-page .ticket-modal :is(input,textarea)::placeholder {
  color: #737d84;
  font-weight: 500;
  opacity: 1;
}

body.dashboard-page .ticket-modal select {
  appearance: none;
  padding-left: 48px;
  background-color: #0f1316;
  background-image: linear-gradient(45deg,transparent 50%,#a3adb4 50%),linear-gradient(135deg,#a3adb4 50%,transparent 50%),linear-gradient(#32383d,#32383d);
  background-position: 21px calc(50% - 2px),16px calc(50% - 2px),42px 50%;
  background-size: 6px 6px,6px 6px,1px 24px;
  background-repeat: no-repeat;
  cursor: pointer;
}

body.dashboard-page .ticket-modal textarea {
  min-height: 164px;
  padding: 15px 16px;
  resize: vertical;
  line-height: 2;
}

body.dashboard-page .ticket-modal :is(input:not([type=file]),select,textarea):hover {
  border-color: #555e64;
  background-color: #13181b;
}

body.dashboard-page .ticket-modal :is(input:not([type=file]),select,textarea):focus {
  border-color: #74becd;
  background-color: #12181b;
  box-shadow: 0 0 0 4px rgb(116 190 205 / 12%),0 12px 26px rgb(0 0 0 / 18%);
}

body.dashboard-page .ticket-modal :is(.form-row,.ticket-form-row) {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}

body.dashboard-page .ticket-modal .attachment-field {
  position: relative;
  display: grid!important;
  grid-template-columns: 46px minmax(0,1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 80px;
  box-sizing: border-box;
  margin: 2px 0 20px;
  padding: 13px 14px;
  border: 1px dashed #526168;
  border-radius: 14px;
  background: #1b2023;
  color: #dfe5e8;
  cursor: pointer;
  transition: border-color .18s ease,background .18s ease,box-shadow .18s ease;
}

body.dashboard-page .ticket-modal .attachment-field::before {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid #3f4c52;
  border-radius: 12px;
  background: #252c30;
  color: #8fd1dd;
  content: "+";
  font: 400 25px/1 Arial,sans-serif;
}

body.dashboard-page .ticket-modal .attachment-field:hover,
body.dashboard-page .ticket-modal .attachment-field:focus-within {
  border-color: #79c5d3;
  background: #20272a;
  box-shadow: 0 0 0 4px rgb(121 197 211 / 9%);
}

body.dashboard-page .ticket-modal .attachment-field span {
  min-width: 0;
}

body.dashboard-page .ticket-modal .attachment-field b,
body.dashboard-page .ticket-modal .attachment-field small {
  display: block;
}

body.dashboard-page .ticket-modal .attachment-field b {
  color: #eef2f4;
  font-size: 11px;
  font-weight: 800;
}

body.dashboard-page .ticket-modal .attachment-field small {
  margin-top: 4px;
  color: #89939a;
  font-size: 9px;
  font-weight: 500;
}

body.dashboard-page .ticket-modal .attachment-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

body.dashboard-page .ticket-modal .attachment-field em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  max-width: 180px;
  box-sizing: border-box;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid #4c5c63;
  border-radius: 10px;
  background: #293236;
  color: #a5dce5;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dashboard-page .ticket-modal .modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding-top: 2px;
}

body.dashboard-page .ticket-modal .modal-actions button {
  min-height: 48px;
  box-sizing: border-box;
  padding-inline: 20px;
  border-radius: 12px;
  font: 800 11px Vazirmatn,Tahoma,sans-serif;
  transition: border-color .18s ease,background .18s ease,transform .18s ease,box-shadow .18s ease;
}

body.dashboard-page .ticket-modal .modal-actions button:hover {
  transform: translateY(-1px);
}

body.dashboard-page .ticket-modal .modal-actions .primary-button {
  min-width: 148px;
  border: 1px solid #82ccd7;
  background: linear-gradient(135deg,#9bdddf,#6eb9c8);
  color: #071113;
  box-shadow: 0 8px 24px rgb(92 181 197 / 20%);
}

body.dashboard-page .ticket-modal .modal-actions .secondary-button {
  border: 1px solid #3f464b;
  background: #23272a;
  color: #d4dadd;
}

body.dashboard-page .ticket-modal .form-message {
  min-height: 18px;
  margin: 8px 0 0;
  color: #9edbe4;
  font-size: 10px;
}

html[data-podly-theme=light] body.dashboard-page .ticket-modal {
  border-color: #d5dde2;
  background: #fff;
  color: #17242c;
  box-shadow: 0 32px 90px rgb(25 43 52 / 22%);
}

html[data-podly-theme=light] body.dashboard-page .ticket-modal .modal-head {
  border-color: #dce3e7;
  background: linear-gradient(145deg,#f7fafb,#eef3f5);
}

html[data-podly-theme=light] body.dashboard-page .ticket-modal .modal-head h2,
html[data-podly-theme=light] body.dashboard-page .ticket-modal .ticket-field-label,
html[data-podly-theme=light] body.dashboard-page .ticket-modal .attachment-field b {
  color: #182a33!important;
}

html[data-podly-theme=light] body.dashboard-page .ticket-modal :is(input:not([type=file]),select,textarea) {
  border-color: #c9d4da!important;
  background-color: #f8fafb!important;
  color: #1d303a!important;
}

html[data-podly-theme=light] body.dashboard-page .ticket-modal .attachment-field {
  border-color: #b6c8cf!important;
  background: #f3f7f8!important;
  color: #243740!important;
}

html[data-podly-theme=light] body.dashboard-page .ticket-modal .attachment-field em {
  border-color: #b9cbd2!important;
  background: #e5eff2!important;
  color: #15576a!important;
}

@media (max-width:620px) {
  body.dashboard-page .ticket-modal {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 12px);
    margin: auto 0 0;
    border-width: 1px 0 0;
    border-radius: 22px 22px 0 0;
  }

  body.dashboard-page .ticket-modal form {
    padding: 20px 16px max(20px,env(safe-area-inset-bottom));
  }

  body.dashboard-page .ticket-modal form::before {
    right: 24px;
    left: 24px;
  }

  body.dashboard-page .ticket-modal .modal-head {
    gap: 14px;
    margin: -20px -16px 20px;
    padding: 24px 16px 19px;
  }

  body.dashboard-page .ticket-modal .modal-head h2 {
    font-size: 20px;
  }

  body.dashboard-page .ticket-modal .modal-head p {
    max-width: 270px;
    font-size: 10px;
  }

  body.dashboard-page .ticket-modal .close-button {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  body.dashboard-page .ticket-modal :is(.form-row,.ticket-form-row) {
    grid-template-columns: 1fr;
    gap: 0;
  }

  body.dashboard-page .ticket-modal .ticket-field {
    margin-bottom: 15px;
  }

  body.dashboard-page .ticket-modal textarea {
    min-height: 142px;
  }

  body.dashboard-page .ticket-modal .attachment-field {
    grid-template-columns: 42px minmax(0,1fr);
    min-height: 76px;
  }

  body.dashboard-page .ticket-modal .attachment-field::before {
    width: 42px;
    height: 42px;
  }

  body.dashboard-page .ticket-modal .attachment-field em {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }

  body.dashboard-page .ticket-modal .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.dashboard-page .ticket-modal .modal-actions .primary-button,
  body.dashboard-page .ticket-modal .modal-actions .secondary-button {
    width: 100%;
  }

  body.dashboard-page .ticket-modal .modal-actions .primary-button {
    order: -1;
  }
}

/* Filled controls with an in-field label; intentionally distinct from legacy ticket inputs. */
body.dashboard-page .ticket-modal .ticket-field {
  position: relative;
  display: block;
  margin: 0 0 14px;
}

body.dashboard-page .ticket-modal .ticket-field::after {
  position: absolute;
  top: 12px;
  right: 0;
  bottom: 12px;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: #444b4f;
  content: "";
  transition: background .18s ease,box-shadow .18s ease;
}

body.dashboard-page .ticket-modal .ticket-field:focus-within::after {
  background: #82d2dd;
  box-shadow: 0 0 12px rgb(130 210 221 / 45%);
}

body.dashboard-page .ticket-modal .ticket-field-label {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 17px;
  left: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  color: #9ba4a9;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.5;
  pointer-events: none;
}

body.dashboard-page .ticket-modal .ticket-field-label small {
  color: #6f797f;
  font-size: 8px;
}

body.dashboard-page .ticket-modal .ticket-field :is(input:not([type=file]),select,textarea) {
  border: 1px solid #343a3e!important;
  border-radius: 14px!important;
  background-color: #24282b!important;
  color: #f4f6f7!important;
  box-shadow: 0 1px 0 rgb(255 255 255 / 4%) inset!important;
}

body.dashboard-page .ticket-modal .ticket-field :is(input:not([type=file]),select) {
  min-height: 66px!important;
  padding: 24px 17px 6px!important;
  font-size: 13px!important;
}

body.dashboard-page .ticket-modal .ticket-field select {
  padding-left: 50px!important;
  background-image: linear-gradient(45deg,transparent 50%,#aeb8bd 50%),linear-gradient(135deg,#aeb8bd 50%,transparent 50%),linear-gradient(#3c4347,#3c4347)!important;
  background-position: 22px calc(50% + 5px),17px calc(50% + 5px),43px calc(50% + 5px)!important;
  background-size: 6px 6px,6px 6px,1px 22px!important;
  background-repeat: no-repeat!important;
}

body.dashboard-page .ticket-modal .ticket-field textarea {
  min-height: 184px!important;
  padding: 38px 17px 15px!important;
  font-size: 12px!important;
}

body.dashboard-page .ticket-modal .ticket-field :is(input:not([type=file]),select,textarea):hover {
  border-color: #50585d!important;
  background-color: #282d30!important;
}

body.dashboard-page .ticket-modal .ticket-field :is(input:not([type=file]),select,textarea):focus {
  border-color: #75c7d3!important;
  background-color: #2a3033!important;
  box-shadow: 0 0 0 4px rgb(117 199 211 / 12%),0 12px 26px rgb(0 0 0 / 16%)!important;
}

body.dashboard-page .ticket-modal .ticket-field :is(input,textarea)::placeholder {
  color: #a0a8ad!important;
}

body.dashboard-page .ticket-modal .modal-actions .primary-button {
  border-color: #8bd7df!important;
  background: linear-gradient(135deg,#a5e6e5,#72c5d2)!important;
  color: #071315!important;
  box-shadow: 0 10px 28px rgb(94 197 210 / 24%)!important;
}

body.dashboard-page .ticket-modal .modal-actions .primary-button:hover {
  background: linear-gradient(135deg,#b8eeeb,#84d4de)!important;
  box-shadow: 0 12px 32px rgb(94 197 210 / 32%)!important;
}

html[data-podly-theme=light] body.dashboard-page .ticket-modal .ticket-field :is(input:not([type=file]),select,textarea) {
  border-color: #d2dce1!important;
  background-color: #edf3f5!important;
  color: #182a33!important;
}

html[data-podly-theme=light] body.dashboard-page .ticket-modal .ticket-field-label {
  color: #52656f!important;
}

@media (max-width:620px) {
  body.dashboard-page .ticket-modal .ticket-field {
    margin-bottom: 12px;
  }

  body.dashboard-page .ticket-modal .ticket-field :is(input:not([type=file]),select) {
    min-height: 62px!important;
  }

  body.dashboard-page .ticket-modal .ticket-field textarea {
    min-height: 154px!important;
  }
}
