:root {
  font-family: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
  color: #111827;
  background: #f3f4f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.upload-widget-shell {
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 18px;
  background: #ffffff;
  --upload-row-main-width: clamp(190px, 22vw, 280px);
  --upload-row-gap: clamp(10px, 1.2vw, 18px);
  --upload-progress-min-width: 120px;
}

.upload-widget-shell-locked {
  opacity: 0.92;
}

.upload-widget-shell-virus {
  border-color: #fb923c;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.12);
}

.upload-lock-banner {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #e0e7ff;
  color: #1e3a8a;
  font-weight: 600;
}

.upload-widget-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.upload-widget-header h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
}

.upload-widget-header p {
  margin: 0;
  color: #6b7280;
}

.transcript-recommend-text {
    margin-top: 6px !important;
    color: #7c1230 !important;
    font-weight: 500;
}

.supported-types-text {
  margin-top: 8px;
  color: #475569;
  font-size: 13px;
}

.summary-card {
  min-width: 200px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #1e3a8a;
}

.summary-card-subtitle {
  font-size: 12px;
  color: #3730a3;
}

.upload-notice-panel {
  margin-top: 14px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #d8dbe4;
  border-left: 4px solid #7c1230;
  background: #f5f4f8;
  border-radius: 10px;
  color: #2f3640;
}

.upload-notice-panel ul {
  margin: 0 0 12px 0;
  padding-left: 22px;
}

.upload-notice-panel li {
  margin-bottom: 8px;
}

.notice-ack-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-top: 2px;
  border-top: 1px solid #e2e5ed;
}

.notice-ack-row span {
  color: #253041;
}

.validation-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 12px;
  font-weight: 600;
}

.virus-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #fdba74;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 12px;
  font-weight: 700;
}

.upload-list-shell {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.upload-item-card + .upload-item-card {
  border-top: 1px solid #cbd5e1;
  box-shadow: inset 0 1px 0 #f8fafc;
}

.upload-item-card-virus {
  background: #fff7ed;
  border-left: 4px solid #f97316;
}

.status-file-icon-pending {
  color: #cbd5e1;
}

.drop-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #f8fafc;
}

.drop-panel-readonly {
  opacity: 0.7;
}

.browse-button {
  background: #1e3a8a;
  border: 1px solid #1b347a;
  color: #ffffff;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.browse-button:hover:not(:disabled) {
  background: #2547a8;
}

.browse-button:active:not(:disabled) {
  background: #1b347a;
}

.browse-button:disabled {
  opacity: 0.6;
}

.drop-hint {
  font-size: 18px;
  color: #475569;
}

.uploaded-file-row {
  padding: 16px 18px;
}

.file-top-row,
.transcript-upload-row {
  display: grid;
  grid-template-columns: minmax(0, var(--upload-row-main-width)) minmax(var(--upload-progress-min-width), 1fr);
  align-items: center;
  gap: var(--upload-row-gap);
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.file-main-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-heading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.file-heading-content {
  min-width: 0;
  flex: 1 1 auto;
}

.file-name-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-title {
  font-size: 18px;
  font-weight: 600;
  word-break: break-word;
}

.file-subtitle,
.transcript-file-name {
  color: #6b7280;
  font-size: 14px;
}

.upload-success-text {
  color: #059669;
  font-size: 14px;
  font-weight: 500;
}

.upload-malware-text {
  color: #dc2626;
  font-size: 14px;
  font-weight: 500;
}

.upload-progress-text {
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
}

.file-actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-delete-button {
  margin-left: auto;
}

.file-inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.file-inline-progress {
  width: auto;
  height: 10px;
  margin: 0;
  flex: 1 1 0;
  min-width: 0;
}

.file-delete-button:hover {
    color: var(--bs-danger) !important;
}

.case-file-card-virus .file-delete-button,
.case-file-card-virus .case-file-delete-button,
.case-file-card-virus .case-file-transcript-delete-button {
  color: #b91c1c !important;
}

.case-file-card-virus .file-delete-button:hover,
.case-file-card-virus .case-file-delete-button:hover,
.case-file-card-virus .case-file-transcript-delete-button:hover {
  color: #991b1b !important;
  background: rgba(185, 28, 28, 0.10);
  border-radius: 8px;
}

.status-file-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: inline-block;
}

.status-file-icon-ready {
  color: #1e3a8a;
}

.status-file-icon-scan {
  color: #c2410c;
  overflow: visible;
  transform-box: fill-box;
  transform-origin: center;
  animation: scan-icon-spin 1.05s linear infinite;
  will-change: transform;
}

.status-file-icon-scan .scan-radar-ring,
.status-file-icon-scan .scan-radar-sweep {
  transform-box: fill-box;
  transform-origin: center;
  animation: scan-rotate 1.15s linear infinite;
}

.status-file-icon-scan .scan-radar-ring-inner {
  animation-duration: 1.7s;
  animation-direction: reverse;
}

.status-file-icon-scan .scan-radar-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: scan-pulse 1s ease-in-out infinite;
}

.status-file-icon-clean {
  color: #16a34a;
}

.status-file-icon-quarantine {
  color: #f97316;
}

.status-file-icon-failed {
  color: #dc2626;
}

.status-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #cbd5e1;
  border-top-color: #315efb;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
  flex: 0 0 auto;
}

.upload-processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-processing-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
}

.upload-processing-dialog {
  position: relative;
  z-index: 1;
  min-width: 320px;
  max-width: 90vw;
  padding: 24px 28px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.upload-processing-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #dbe3f0;
  border-top-color: #1e3a8a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.upload-processing-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.upload-processing-text {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.5;
}

.progress-row span {
  margin-left: auto;
  font-size: 18px;
  color: #374151;
}

.upload-progress-bar-shell {
  height: 10px;
  background: #e5e7eb;
}

.upload-progress-bar {
  background: #315efb;
}

.transcript-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
}

.transcript-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #374151;
}

.upload-submit-row {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.upload-submit-button {
  min-width: 120px;
}

.upload-submit-button:disabled {
  opacity: 0.7;
}

.transcript-upload-status {
  font-size: 14px;
  color: #475569;
  white-space: nowrap;
}

.transcript-file-body {
  min-width: 0;
  width: 100%;
}

.transcript-file-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.transcript-file-status-icon {
  flex: 0 0 auto;
}

.transcript-upload-status-meta {
  color: #6b7280;
  font-size: 13px;
  margin-top: 2px;
}

.transcript-file-inline-actions {
  width: 100%;
  margin-left: 0;
}

.transcript-browse-button {
  min-width: 0;
  width: auto;
  height: 36px;
  padding: 7px 14px;
  border-radius: 999px;
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

.transcript-browse-button:hover:not(:disabled) {
  border-color: #a5b4fc;
  background: #e0e7ff;
  color: #1e3a8a;
}

.transcript-browse-button:active:not(:disabled) {
  background: #c7d2fe;
  color: #1e3a8a;
}

.upload-result-modal-success {
  border-top: 4px solid #16a34a;
}

.upload-result-modal-danger {
  border-top: 4px solid #dc2626;
}

.upload-result-modal .modal-header {
  border-bottom-color: #e5e7eb;
}

.upload-result-modal .modal-footer {
  border-top-color: #e5e7eb;
}

.case-files-shell {
  margin-bottom: 18px;
}

.case-files-shell-header,
.case-files-shell-title,
.case-files-shell-subtitle {
  display: none;
}

.case-files-loading {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 700;
}

.case-files-error {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 14px;
}

.case-files-groups {
  display: grid;
  gap: 14px;
}

.case-files-group {
  overflow: hidden;
  border: 1px solid #d8dbe4;
  border-radius: 12px;
  background: #ffffff;
}

.case-files-group-neutral {
  border-left: 4px solid #1e3a8a;
}

.case-files-group-owned {
  border-left: 4px solid #1e3a8a;
}

.case-files-group-readonly {
  border-left: 4px solid #7c1230;
}

.case-files-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #d8dbe4;
  background: #f8fafc;
}

.case-files-group-neutral .case-files-group-header {
  background: #eef2ff;
}

.case-files-group-title {
  margin: 0;
  color: #2f3640;
  font-size: 14px;
  font-weight: 700;
}

.case-files-group-description {
  margin: 3px 0 0;
  color: #6b7280;
  font-size: 12px;
}

.case-files-group-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #1e3a8a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.case-files-group-body {
  display: flex;
  flex-direction: column;
}

.case-files-empty {
  padding: 12px;
  color: #6b7280;
  font-size: 13px;
}

.case-file-card {
  padding: 12px 14px;
}

.case-file-card + .case-file-card {
  border-top: 2px solid #b8c2cf;
}

.case-files-group-body .case-file-card:nth-child(odd):not(.case-file-card-virus) {
  background: #ffffff;
}

.case-files-group-body .case-file-card:nth-child(even):not(.case-file-card-virus) {
  background: #eef2f7;
}

.case-file-card-editable {
  border-left: 3px solid #1e3a8a;
}

.case-file-card-locked {
  background: #fafafa;
}

.case-files-group-body .case-file-card.case-file-card-locked:nth-child(even):not(.case-file-card-virus) {
  background: #f3f4f6;
}

.case-file-card-virus {
  border-left: 4px solid #f97316;
  background: #fff7ed;
}

.case-file-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.case-file-heading-row {
  width: 100%;
}

.case-file-heading-content {
  min-width: 0;
}

.case-file-title {
  color: #2f3640;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.case-file-open-player-button {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.case-file-open-player-button:hover {
  color: #1E3A8A;
}

.case-file-subtitle {
  margin-top: 3px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}

.case-file-delete-button {
  margin-left: auto;
}

.case-file-transcript-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d8dbe4;
}

.case-file-transcript-content {
  min-width: 0;
}

.case-file-transcript-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.case-file-transcript-meta-text {
  min-width: 0;
}

.case-file-transcript-title {
  color: #2f3640;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.case-file-transcript-empty {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d8dbe4;
  font-size: 12px;
}

.icon-action-button {
  border: none;
  background: transparent;
  color: #6b7280;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-action-button.muted {
  color: #6b7280;
}

.icon-svg {
  width: 24px;
  height: 24px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes scan-icon-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes scan-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes scan-pulse {
  0%, 100% {
    transform: scale(0.85);
    opacity: 0.65;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@media (max-width: 992px) {
  .upload-widget-shell {
    --upload-row-main-width: clamp(180px, 32vw, 240px);
    --upload-progress-min-width: 90px;
  }

  .upload-widget-header {
    flex-direction: column;
  }

  .summary-card {
    width: 100%;
  }

  .file-title {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
    .upload-widget-shell {
        padding: 16px;
        --upload-row-main-width: 100%;
        --upload-row-gap: 10px;
        --upload-progress-min-width: 0;
    }

    .drop-panel,
    .progress-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .file-top-row,
    .transcript-upload-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .drop-hint {
        font-size: 18px;
    }

    .uploaded-file-row {
        padding: 18px 16px;
    }

    .file-actions-right,
    .file-inline-actions,
    .transcript-file-inline-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .file-inline-progress {
        width: 100%;
        flex: 1 1 auto;
    }

    .transcript-browse-button {
        width: auto;
        min-width: 0;
    }

    .progress-row span {
        margin-left: 0;
    }
}

.delete-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: #374151;
  font-weight: 600;
}

.delete-dialog-spinner {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

.delete-dialog-error {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 8px;
  font-weight: 600;
}

.btn-inline-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: -3px;
}
