/* Overlay */
.raise-ticket-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 29, 45, 0.35);
  font-family: Arial, Helvetica, sans-serif;
  color: #26334d;
}

/* Modal */
.raise-ticket-modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  background: #ffffff;
  border-radius: 11px;
  box-shadow: 0 12px 40px rgba(20, 35, 60, 0.18);
}

/* Header */
.raise-ticket-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 17px 17px;
  border-bottom: 1px solid #f0f1f4;
}

.raise-ticket-header h2 {
  margin: 0 0 5px;
  color: #26334d;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.raise-ticket-header p {
  margin: 0;
  color: #637495;
  font-size: 13px;
  line-height: 1.5;
}

.raise-ticket-close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 2px;
  margin-top: 1px;
  color: #4b5565;
  background: transparent;
  border: none;
  cursor: pointer;
}

.raise-ticket-close:hover {
  color: #111827;
}

/* Form */
.raise-ticket-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.raise-ticket-body {
  padding: 14px 17px 27px;
  overflow-y: auto;
}

.raise-ticket-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 13px;
}

.raise-ticket-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.raise-ticket-field label {
  margin: 0 0 8px;
  color: #263653;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

.required-star {
  color: #ef4444;
  font-weight: 600;
}

/* Inputs and dropdowns */
.raise-ticket-field input,
.raise-ticket-field textarea,
.ticket-select-wrapper select {
  box-sizing: border-box;
  width: 100%;
  color: #334155;
  background-color: #ffffff;
  border: 1px solid #d4dced;
  border-radius: 4px;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.raise-ticket-field input {
  height: 36px;
  padding: 0 11px;
}

.raise-ticket-field input::placeholder,
.raise-ticket-field textarea::placeholder,
.ticket-select-wrapper select:invalid {
  color: #8494b3;
  opacity: 1;
}

.raise-ticket-field input:focus,
.raise-ticket-field textarea:focus,
.ticket-select-wrapper select:focus {
  border-color: #1689d4;
  box-shadow: 0 0 0 2px rgba(22, 137, 212, 0.1);
}

/* Custom dropdown arrow */
.ticket-select-wrapper {
  position: relative;
  width: 100%;
}

.ticket-select-wrapper select {
  height: 36px;
  padding: 0 34px 0 11px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.ticket-select-wrapper svg {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #52688c;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transform: translateY(-50%);
}

/* Subject */
.ticket-subject-field {
  margin-top: 20px;
}

/* Description */
.ticket-description-field {
  margin-top: 24px;
}

.raise-ticket-field textarea {
  display: block;
  min-height: 93px;
  padding: 12px 11px;
  line-height: 1.5;
  resize: vertical;
}

.ticket-character-count {
  margin-top: 5px;
  color: #52678c;
  font-size: 11px;
  text-align: right;
}

/* Attachments */
.ticket-attachments-section {
  margin-top: 13px;
  padding: 12px 11px 13px;
  border: 1px dashed #d4deee;
  border-radius: 4px;
}

.ticket-attachments-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: #2c3c5a;
  font-size: 14px;
}

.ticket-optional {
  color: #667897;
  font-size: 11px;
}

.ticket-attachment-limit {
  color: #53688e;
  font-size: 12px;
  white-space: nowrap;
}

.ticket-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 77px;
  padding: 9px 8px;
  border: 1px dashed #d9e9cd;
  border-radius: 4px;
  background: #ffffff;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.ticket-dropzone-active {
  background: #f5fbf0;
  border-color: #71c212;
}

.ticket-hidden-file-input {
  display: none;
}

.ticket-upload-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 4px;
  color: #43a800;
}

.ticket-upload-main-text {
  color: #52617b;
  font-size: 13px;
  line-height: 1.5;
}

.ticket-upload-link {
  display: inline;
  padding: 0;
  color: #299600;
  background: transparent;
  border: none;
  font: inherit;
  cursor: pointer;
}

.ticket-upload-link:hover {
  color: #187500;
  text-decoration: underline;
}

.ticket-supported-formats {
  margin: 6px 0 0;
  color: #5c6f93;
  font-size: 11px;
  line-height: 1.4;
}

/* Selected files */
.ticket-attachment-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.ticket-attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  background: #f7f9fc;
  border: 1px solid #e6ebf3;
  border-radius: 4px;
  font-size: 11px;
}

.ticket-file-name {
  overflow: hidden;
  color: #334155;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-attachment-item button {
  flex-shrink: 0;
  padding: 0;
  color: #d14343;
  background: transparent;
  border: none;
  font-size: 11px;
  cursor: pointer;
}

/* Validation error */
.ticket-form-error {
  margin: 12px 0 0;
  color: #dc2626;
  font-size: 12px;
}

/* Footer */
.raise-ticket-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 26px;
  background: #fafafa;
  border-top: 1px solid #f3f4f6;
}

.ticket-cancel-button,
.ticket-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 35px;
  padding: 0 20px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.ticket-cancel-button {
  min-width: 81px;
  color: #666666;
  background: #fafafa;
  border: 1px solid #dedede;
}

.ticket-cancel-button:hover {
  background: #f0f0f0;
}

.ticket-submit-button {
  min-width: 135px;
  color: #ffffff;
  background: #078ed0;
  border: 1px solid #078ed0;
  box-shadow: 0 2px 4px rgba(0, 103, 170, 0.18);
}

.ticket-submit-button:hover {
  background: #087fba;
  box-shadow: 0 3px 7px rgba(0, 103, 170, 0.23);
}

/* Responsive */
@media (max-width: 520px) {
  .raise-ticket-overlay {
    padding: 10px;
  }

  .raise-ticket-modal {
    max-height: calc(100vh - 20px);
  }

  .raise-ticket-header {
    padding: 16px 13px;
  }

  .raise-ticket-header h2 {
    font-size: 17px;
  }

  .raise-ticket-header p {
    font-size: 12px;
  }

  .raise-ticket-body {
    padding: 14px 13px 22px;
  }

  .raise-ticket-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ticket-subject-field {
    margin-top: 20px;
  }

  .ticket-description-field {
    margin-top: 20px;
  }

  .ticket-attachments-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .raise-ticket-footer {
    padding: 14px 13px;
  }

  .ticket-cancel-button,
  .ticket-submit-button {
    padding: 0 13px;
  }
}