.container.streams-detail-container { padding-top: 8px; }
.streams-detail-card { padding: 16px; border-radius: 12px; background: #fff; color: #000; box-shadow: 0 2px 16px rgba(0, 0, 0, .1); }
.streams-detail-header { display: flex; align-items: center; gap: 16px; min-width: 0; }
.streams-detail-header h1 { flex: 1; min-width: 0; margin: 0; font-size: 24px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.streams-detail-id { flex: 0 1 auto; min-width: 0; max-width: 30%; color: #999; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.streams-detail-management { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.streams-detail-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 12px; border: 1px solid #0153cc; border-radius: 8px; background: #fff; color: #0153cc; font: inherit; font-size: 16px; font-weight: 500; line-height: 24px; text-align: center; cursor: pointer; }
.streams-detail-button:hover { background: #f2f7ff; color: #0153cc; }
.streams-detail-button :is(img, svg) { flex: none; width: 24px; height: 24px; }
.streams-detail-button--primary { border: 0; color: #fff; background: linear-gradient(244deg, #bb33ff 0%, #3485fe 99.108%); box-shadow: 0 2px 16px rgba(0, 0, 0, .1); }
.streams-detail-button--primary:hover { color: #fff; background: linear-gradient(244deg, #aa2de8 0%, #2678f0 99.108%); }
.streams-detail-button--delete { border-color: #b91222; background: #b91222; color: #fff; box-shadow: 0 2px 16px rgba(0, 0, 0, .1); }
.streams-detail-button--delete:hover { border-color: #970e1c; background: #970e1c; color: #fff; }
.streams-detail-delete-trigger { flex: none; width: 42px; padding: 8px; }
.streams-detail-button--create { flex-shrink: 0; border-color: #0153cc; background: #0153cc; color: #fff; box-shadow: 0 2px 16px rgba(0, 0, 0, .1); }
.streams-detail-button--create:hover { background: #0045ae; color: #fff; }
.streams-detail-button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.streams-detail-divider { height: 1px; margin-block: 16px; background: linear-gradient(90deg, #277dc9, #bb33ff, #00eeff); }
.streams-detail-summary { display: grid; grid-template-columns: minmax(0, 390px) minmax(0, 1fr); align-items: start; gap: 16px; }
.streams-detail-media { min-width: 0; }
.streams-detail-image { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 12px; background: #e6fdff; }
.streams-detail-image .streams-placeholder { font-size: 24px; line-height: 1.25; text-align: center; }
.streams-detail-playback { display: flex; gap: 8px; margin-top: 8px; }
.streams-detail-playback .streams-detail-button { flex: 1; padding-inline: 8px; white-space: nowrap; }
.streams-detail-information { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.streams-detail-overview { display: flex; align-items: flex-start; gap: 8px; }
.streams-detail-description { flex: 1; min-width: 0; }
.streams-detail-description p { margin: 0 0 4px; font-size: 16px; line-height: 1.25; white-space: pre-wrap; overflow-wrap: anywhere; }
.streams-detail-state { display: inline-flex; flex: none; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 12px; background: #00b398; color: #000; font-size: 16px; font-weight: 400; line-height: 19px; white-space: nowrap; }
.streams-detail-state img { display: block; width: 16px; height: 16px; }
.streams-detail-timestamps { display: flex; flex-wrap: wrap; gap: 4px 16px; color: #666; font-size: 12px; line-height: 1.5; }
.streams-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.streams-detail-grid--clinical { padding: 8px; border-radius: 8px; background: #f2f7ff; }
.streams-detail-grid--location { padding: 8px; border-radius: 8px; background: #f2f2f2; }
.streams-detail-grid--technical { padding-inline: 8px; }
.streams-detail-field { min-width: 0; padding: 8px 16px; }
.streams-detail-field dt { margin-bottom: 6px; color: #999; font-size: 10px; font-weight: 500; line-height: 1.4; text-transform: uppercase; overflow-wrap: anywhere; }
.streams-detail-field dd { margin: 0; color: #000; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.streams-detail-grid--technical dd { font-size: 14px; }
.streams-detail-cases { margin-top: 32px; border-radius: 12px; background: #fff; box-shadow: 0 2px 16px rgba(0, 0, 0, .1); color: #000; }
.streams-detail-cases > summary { display: flex; align-items: center; gap: 16px; padding: 16px; cursor: pointer; list-style: none; }
.streams-detail-cases > summary::-webkit-details-marker { display: none; }
.streams-detail-cases > .streams-detail-cases-summary--prerequisite { flex-wrap: wrap; row-gap: 8px; }
.streams-detail-cases-heading { flex: 1; min-width: 0; font-size: 24px; line-height: 1.2; }
.streams-detail-case-count { flex-shrink: 0; color: #666; font-size: 14px; font-style: italic; }
.streams-detail-cases-chevron { flex: none; transition: transform .15s; }
.streams-detail-cases[open] > summary .streams-detail-cases-chevron { transform: rotate(180deg); }
.streams-detail-cases-content { padding: 0 16px 16px; }
.streams-detail-case-hint { flex: 0 0 100%; min-width: 0; padding-right: 40px; color: #666; font-size: 14px; line-height: 1.5; text-align: right; }
.streams-detail-no-cases { margin: 0; padding: 16px 8px; color: #666; font-size: 14px; line-height: 1.5; }
.streams-detail-case-warning { margin: 0; padding: 8px; border-radius: 4px; background: #fff8e6; color: #705216; font-size: 12px; line-height: 1.4; }
.streams-detail-metadata { margin-top: 32px; }
.streams-detail-metadata-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 16px; margin: 16px 0 0; }
.streams-detail-metadata-grid dt { text-transform: none; }
.streams-detail-metadata-grid dd { overflow: hidden; font-size: 14px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; user-select: text; }
.streams-detail-metadata-grid dd:is(:hover, :focus) { overflow: visible; white-space: pre-wrap; }
.streams-detail :is(a, button, summary, [tabindex]):focus-visible { outline: 2px solid #0153cc; outline-offset: 3px; }

.streams-delete-dialog { width: 604px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; border-radius: 12px; background: #fff; color: #000; box-shadow: 0 8px 40px rgba(0, 0, 0, .2); overflow-y: auto; }
.streams-delete-dialog::backdrop { background: rgba(0, 0, 0, .4); }
.streams-delete-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border-bottom: 1px solid #00eeff; }
.streams-delete-header h2 { margin: 0; font-size: 16px; font-weight: 700; line-height: 24px; }
.streams-delete-close { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.streams-delete-close img { width: 24px; height: 24px; }
.streams-delete-content { padding: 16px; }
.streams-delete-identity { margin: 0 0 16px; padding: 8px 16px; border-radius: 8px; background: #f2f7ff; }
.streams-delete-identity dt { color: #999; font-size: 10px; line-height: 14px; }
.streams-delete-identity dd { margin: 0; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.streams-delete-content p { margin: 0; color: #666; font-size: 12px; line-height: 1.5; }
.streams-delete-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border-top: 1px solid #00eeff; }
.streams-delete-cancel { padding: 4px 12px; border: 1px solid #444; border-radius: 4px; background: #fff; color: #000; font: inherit; font-size: 14px; line-height: 20px; cursor: pointer; }
.streams-delete-cancel:hover { background: #f2f2f2; }
.streams-delete-dialog button:disabled { cursor: not-allowed; opacity: .5; }

@media (max-width: 1200px) {
  .streams-detail-header { flex-wrap: wrap; }
  .streams-detail-header h1 { flex-basis: 55%; }
  .streams-detail-id { max-width: 40%; }
  .streams-detail-management { width: 100%; }
  .streams-detail-summary { grid-template-columns: minmax(0, 34%) minmax(0, 1fr); }
  .streams-detail-playback { flex-direction: column; }
  .streams-detail-field { padding: 8px; }
}

@media (max-width: 850px) {
  .streams-detail-summary { grid-template-columns: minmax(0, 1fr); }
  .streams-detail-media { max-width: 390px; width: 100%; }
  .streams-detail-playback { flex-direction: row; }
  .streams-detail-cases > summary { flex-wrap: wrap; gap: 12px; }
  .streams-detail-cases-heading { flex-basis: calc(100% - 100px); font-size: 20px; }
  .streams-detail-cases-chevron { margin-left: auto; }
  .streams-detail-metadata-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .streams-detail-overview { flex-direction: column; }
  .streams-detail-state { align-self: flex-end; order: -1; }
  .streams-detail-card { padding: 12px; }
  .streams-detail-header { gap: 8px; }
  .streams-detail-header h1 { flex-basis: 100%; font-size: 20px; }
  .streams-detail-id { max-width: 100%; font-size: 12px; }
  .streams-detail-management { margin-top: 8px; justify-content: flex-start; }
  .streams-detail-management .streams-detail-button { font-size: 13px; line-height: 20px; padding: 8px; }
  .streams-detail-playback .streams-detail-button { gap: 4px; font-size: 14px; }
  .streams-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .streams-detail-field dd { font-size: 14px; }
  .streams-detail-cases > summary { padding: 12px; }
  .streams-detail-cases-heading { flex-basis: 100%; }
  .streams-detail-case-count { font-size: 12px; }
  .streams-detail-case-hint { padding-right: 0; text-align: left; }
  .streams-detail-button--create { gap: 4px; padding: 8px; font-size: 14px; }
  .streams-detail-cases-content { padding-inline: 12px; }
  .streams-detail-metadata-grid { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .streams-detail-cases-chevron { transition: none; }
}
