/*
 * KOrder styles · public/css/06b-admin-media-devices.css
 * Admin: idle preview, uploaded media, sound settings, tablet devices, forced update, file picker.
 *
 * public/css/*.css used to be one public/styles.css. The files are cut from it in order
 * and index.html loads them in that same order, which is the CSS cascade order: do not
 * reorder the <link> tags, and add a rule to the file that owns its screen.
 * Map: public/css/README.md
 */

.idle-preview {
  display: grid;
  min-height: 230px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111;
}

.idle-preview img,
.idle-preview video {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
}

.idle-preview-empty {
  display: grid;
  min-height: 230px;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(140deg, rgba(8, 127, 117, 0.82), rgba(23, 23, 23, 0.78)),
    #171717;
}

.idle-media-library-field .select {
  min-height: 46px;
}

.field-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.uploaded-media-manager {
  display: grid;
  max-height: 260px;
  margin-top: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.uploaded-media-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.uploaded-media-row:last-child {
  border-bottom: 0;
}

.sound-settings-form {
  align-items: start;
}

.sound-setting-list {
  display: grid;
  gap: 12px;
}

.sound-setting-list h3 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.sound-setting-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(170px, 1fr) minmax(210px, 1.2fr) minmax(140px, 0.8fr) minmax(86px, 0.4fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.sound-setting-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sound-setting-title strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.sound-setting-title span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sound-volume-field {
  min-width: 0;
}

.sound-setting-actions {
  display: grid;
  gap: 8px;
  min-width: 112px;
}

.tablet-app-panel {
  display: grid;
  gap: 16px;
}

.tablet-app-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tablet-app-summary > div,
.tablet-device-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tablet-app-summary > div {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.tablet-app-summary span,
.tablet-device-version span,
.tablet-device-main small,
.tablet-device-main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.tablet-app-summary strong,
.tablet-device-version strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.tablet-device-list {
  display: grid;
  gap: 10px;
}

.tablet-device-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.tablet-device-row.needs-update {
  border-color: rgba(217, 119, 6, 0.35);
  background: #fff8eb;
}

.tablet-device-main,
.tablet-device-version,
.tablet-device-actions {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.tablet-device-main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tablet-device-main span,
.tablet-device-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tablet-device-actions {
  justify-items: end;
}

.forced-update-screen {
  display: grid;
  min-height: 100vh;
  padding: 32px;
  place-items: center;
  color: #fff;
  background: #101820;
}

.forced-update-card {
  display: grid;
  width: min(560px, 100%);
  gap: 18px;
  justify-items: center;
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #182631;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.forced-update-card h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 950;
}

.forced-update-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.45;
}

.forced-update-meta {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.forced-update-meta > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.forced-update-meta span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.forced-update-meta strong {
  font-size: 18px;
  font-weight: 950;
}

.uploaded-media-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.uploaded-media-info strong,
.uploaded-media-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uploaded-media-info strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.uploaded-media-info span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.uploaded-media-info .uploaded-media-usage {
  color: #0f766e;
  font-size: 11px;
  font-weight: 850;
}

.uploaded-media-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.file-picker-field > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.file-picker {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  cursor: pointer;
}

.file-picker.has-label {
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  align-items: stretch;
  gap: 6px 8px;
}

.file-picker-label {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: normal;
}

.file-picker-input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-picker-button,
.file-picker-name {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  font-size: 14px;
}

.file-picker-button {
  justify-content: center;
  min-width: 100px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 900;
  white-space: nowrap;
}

.file-picker-name {
  min-width: 0;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid rgba(217, 222, 216, 0.82);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-picker-name.has-current {
  color: var(--teal-dark);
  background: rgba(15, 118, 110, 0.08);
}

.file-picker:focus-within .file-picker-button {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 117, 0.12);
}

.file-picker.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.file-picker.is-disabled .file-picker-input {
  pointer-events: none;
}
