/* ══════════════════════════════════════════════════════════════
   DEEL (file app) — app-specifieke styling
   Thema-variabelen (--bg, --accent, --green-*, etc.) en day-mode
   overrides voor generieke componenten staan NIET hier — die komen
   uit /css/ibiza-theme.css. Dit bestand bevat alleen layout,
   componenten en animaties die uniek zijn voor de Deel-app,
   plus --accent-dim die alleen deze app gebruikt.
   ══════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --accent-dim is uniek voor deze app (actieve/pressed knopstaat) */
:root {
  --accent-dim: #b8cc2a;
}
body.day {
  --accent-dim: #333333;
}

/* App-specifieke day-mode overrides (classnamen die niet generiek zijn) */
body.day .room-topbar {
  background: #ffffff;
  border-color: #c8c4ba;
}
body.day .room-peer-badge {
  border-color: #b0aca2;
  color: #555;
  background: #e4e1d8;
}
body.day .topbar-logo-placeholder {
  background: #1a1a1a;
}
body.day .file-item {
  background: #ffffff;
  border-color: #c8c4ba;
}
body.day .file-icon {
  background: #e4e1d8;
  border-color: #b0aca2;
}
body.day .room-bottom {
  background: #ffffff;
  border-color: #c8c4ba;
}
body.day .btn-camera {
  background: #f4f1ea;
  border-color: #b0aca2;
  color: #1a1a1a;
}
body.day .toggle-switch input:checked + .toggle-track::after {
  background: #ffffff;
}

/* basis html/body komt uit ibiza-theme.css (achtergrond, kleur,
   visibility:hidden). Hier het app-eigen font en overige layout. */
html,
body {
  height: 100%;
  font-family: "Syne", sans-serif;
  overflow: hidden;
}

.screen {
  position: absolute;
  top: 57px;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.screen.active {
  opacity: 1;
  pointer-events: all;
}

/* APP LOGO */
.app-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.app-logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
}
.app-logo-placeholder {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.app-logo-placeholder .logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* TOPBAR LOGO */
.topbar-logo {
  height: 22px;
  width: auto;
  object-fit: contain;
  margin-right: 4px;
}
.topbar-logo-placeholder {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-text, #0c0c0f);
}
.topbar-logo-placeholder svg {
  width: 12px;
  height: 12px;
}

/* START */
.start-mark {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--accent-text, #0c0c0f);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}
.start-mark svg {
  width: 32px;
  height: 32px;
}
.start-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  line-height: 1.1;
  margin-bottom: 10px;
}
.start-sub {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.5;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-text, #0c0c0f);
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-family: "Syne", sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
  transition:
    background 0.15s,
    transform 0.1s;
}
.btn-primary:active {
  background: var(--accent-dim);
  transform: scale(0.98);
}

/* SHARE */
.share-label {
  font-size: 11px;
  font-family: "DM Mono", monospace;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.qr-wrap {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.room-url {
  font-family: "DM Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
  text-align: center;
  max-width: 320px;
  margin-bottom: 28px;
  line-height: 1.6;
}
.room-url span {
  color: var(--accent);
}
.btn-back {
  background: transparent;
  color: var(--muted);
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
  margin-top: 4px;
}
.btn-back:hover {
  color: var(--text);
}
.btn-copy {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 24px;
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
  margin-bottom: 10px;
}
.btn-proceed {
  background: var(--accent);
  color: var(--accent-text, #0c0c0f);
  border: none;
  border-radius: 10px;
  padding: 13px 24px;
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
}
.waiting-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
}
.dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}
#peerCount {
  color: var(--accent);
  font-weight: 600;
}

/* ROOM */
#room {
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
}
.room-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  height: 100%;
  overflow: hidden;
}
.room-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface);
}
.room-topbar-inner {
  max-width: 900px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}
.room-topbar-title {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}
.room-peer-badge {
  font-size: 11px;
  font-family: "DM Mono", monospace;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
}
.room-peer-badge.connected {
  color: var(--green-text);
  border-color: var(--green-border);
  background: var(--green-bg);
}
.topbar-qr-btn {
  width: 32px;
  height: 32px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
  font-size: 16px;
}

.file-list {
  flex: 1;
  overflow-y: auto;
  width: 100%;
  padding: 16px;
}
.file-list::-webkit-scrollbar {
  width: 4px;
}
.file-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 10px;
  color: var(--muted);
}
.empty-state svg {
  width: 40px;
  height: 40px;
  opacity: 0.3;
}
.empty-state p {
  font-size: 13px;
}

.file-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  animation: slideIn 0.25s ease;
  flex-direction: column;
}
.file-item-top {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.file-preview {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  cursor: pointer;
  position: relative;
}
.file-preview img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  transition: opacity 0.15s;
}
.file-preview:hover img {
  opacity: 0.9;
}
.file-preview-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10px;
  font-family: "DM Mono", monospace;
  color: #fff;
  pointer-events: none;
}

/* branding toggle */
.branding-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
}
.branding-toggle label {
  font-size: 11px;
  font-family: "DM Mono", monospace;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.toggle-switch {
  position: relative;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-track::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition:
    transform 0.2s,
    background 0.2s;
}
.toggle-switch input:checked + .toggle-track {
  background: var(--accent);
}
.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(14px);
  background: #0c0c0f;
}

.file-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
}
.file-icon svg {
  width: 18px;
  height: 18px;
}
.file-info {
  flex: 1;
  min-width: 0;
}
.file-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.file-meta {
  font-size: 11px;
  font-family: "DM Mono", monospace;
  color: var(--muted);
}
.file-progress {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.file-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.1s;
  width: 0%;
}
.file-progress-bar.done {
  background: var(--green-text);
}
.btn-dl {
  background: var(--accent);
  color: var(--accent-text, #0c0c0f);
  border: none;
  border-radius: 7px;
  padding: 7px 12px;
  font-family: "Syne", sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-dir {
  font-size: 10px;
  font-family: "DM Mono", monospace;
  color: var(--muted);
  flex-shrink: 0;
}

/* BOTTOM BAR */
.room-bottom {
  width: 100%;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  display: flex;
  gap: 10px;
}
.btn-send {
  flex: 1;
  background: var(--accent);
  color: var(--accent-text, #0c0c0f);
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-family: "Syne", sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-send:hover {
  background: var(--accent-dim);
}
.btn-camera {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
}
.btn-camera:hover {
  border-color: #444;
}
.btn-camera svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#fileInput,
#cameraInput {
  display: none;
}

/* FOTO MODAL */
#photoModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#photoModal.visible {
  opacity: 1;
  pointer-events: all;
}
#photoModal img {
  max-width: 95vw;
  max-height: 80vh;
  border-radius: 10px;
  object-fit: contain;
  display: block;
}
.modal-actions {
  display: flex;
  gap: 10px;
}
.btn-modal-dl {
  background: var(--accent);
  color: var(--accent-text, #0c0c0f);
  border: none;
  border-radius: 10px;
  padding: 11px 24px;
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.btn-modal-close {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 20px;
  font-family: "Syne", sans-serif;
  font-size: 13px;
  cursor: pointer;
}

/* QR OVERLAY */
#qrOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#qrOverlay.visible {
  opacity: 1;
  pointer-events: all;
}
.qr-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 300px;
  width: 90%;
}
.qr-modal-title {
  font-size: 14px;
  font-weight: 600;
}
.qr-modal-url {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  word-break: break-all;
  line-height: 1.5;
}
.btn-close-overlay {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 20px;
  font-family: "Syne", sans-serif;
  font-size: 12px;
  cursor: pointer;
  width: 100%;
}

/* TOAST — app-specifieke afwijkingen t.o.v. de centrale css/toast.css
   (andere bottom-positie en monospace font dan de overige apps) */
#toast {
  bottom: 90px;
  font-family: "DM Mono", monospace;
}
