:root {
	--bg: #f7f7f7;
	--panel: #ffffff;
	--border: #e2e2e2;
	--text: #333;
	--muted: #777;

	--accent: #4e9ad3;
	--accent-hover: #5eb2f5;

	--success: #2ecc71;
}

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #0f172a, #1e293b, #111827);
  font-family: "Ubuntu", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

@supports(padding: max(0px)) {
  body {
	padding-bottom: max(env(safe-area-inset-bottom), 4rem);
  }
}

.fade-in { 
	animation: fadeIn 0.35s ease-out forwards;
 }

 @keyframes fadeIn { 
	from {opacity:0;
	transform:translateY(10px);}
	to {opacity:1; transform:none;} 
}
.glass { 
	backdrop-filter: blur(14px); 
	background: rgba(255,255,255,0.14); 
}


h1 {
	font-family: "Ubuntu", sans-serif;
	  font-weight: 400;
	  font-style: normal;
}
.container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 80px;

	max-width: 1100px;
	width: 100%;
	margin: 0 auto;
	padding: 20px;
}

.panel-left {
	width: 35%;
}

.logo {
	width: 120px;
	margin-bottom: 20px;
}

.panel-left h1 {
	font-size: 36px;
	margin: 0 0 10px;
}

.tagline {
	color: var(--muted);
	font-size: 16px;
	margin-bottom: 40px;
}

footer {
	font-size: 14px;
	color: var(--muted);
	margin-top: 30px;
}


.panel-center {
	flex: 1;
	background: var(--panel);
	padding: 35px;
	border-radius: 16px;
	border: 1px solid var(--border);

	display: flex;                 /* enable flexbox */
	flex-direction: column;
	justify-content: center;       /* vertical center */
	align-items: center;           /* horizontal center */
	text-align: center;
}

.dropzone {
	background: #f9f9f9;
	border: 2px dashed #d0d0d0;
	border-radius: 16px;
	padding: 50px; /* Adjust as needed */
	text-align: center;
	cursor: pointer;
	transition: 0.2s;

	width: 100%;
	min-height: 180px;
	padding: 30px;
	font-size: 18px;
	box-sizing: border-box !important; /* FIX FOR MOBIL OVERFLOW */
	max-width: 100% !important;        /* GARANTERT INNENFOR VIEWPORT */            /* space between lines */
}

.dropzone.dragover {
	border-color: var(--accent);
	background: #eef7ff;
	color: var(--accent);
}

#fileName {
	margin-top: 20px;
}

.file-item {
	display: flex;
	align-items: center;
	background: #f1f1f1;
	padding: 14px;
	border-radius: 10px;
	border: 1px solid var(--border);
	font-size: 15px;
	color: var(--text);
}

.file-dot {
	width: 10px;
	height: 10px;
	background: var(--success);
	border-radius: 50%;
	margin-right: 10px;
}

.send-btn {
	width: 100%;
	padding: 16px;
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: 12px;
	font-size: 18px;
	font-weight: 700;
	cursor: pointer;
	margin-top: 25px;
	display: none;
}

.send-btn.enabled {
	display: block;
}

.send-btn:hover {
	background: var(--accent-hover);
}

#progressBox {
	margin-top: 25px;
	display: none;
}

#progressContainer {
	width: 100%;
	background: #efefef;
	border: 1px solid var(--border);
	height: 12px;
	border-radius: 6px;
}

#progressBar {
	height: 100%;
	width: 0%;
	background: var(--success);
	border-radius: 6px;
}

#uploadStatus {
	margin-top: 10px;
	color: var(--muted);
}

#downloadURL {
	margin-top: 25px;
	font-size: 16px;
}

#downloadURL a {
	color: var(--accent);
	font-weight: 600;
}

.download-section {
	margin-top: 25px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.btn-download {
	display: block;
	padding: 14px;
	background: #eaeaea;
	text-align: center;
	color: var(--accent);
	border-radius: 12px;
	font-weight: 700;
	text-decoration: none;
	font-size: 16px;
	border: 1px solid #dcdcdc;
}

.btn-download:hover {
	background: #f6f6f6;
}

.btn-copy {
	padding: 14px;
	background: var(--accent);
	color: white;
	border: none;
	border-radius: 12px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.btn-copy:hover {
	background: var(--accent-hover);
}


/* ------------ MODAL ------------ */
.modal {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.55);
	display: none;
	justify-content: center;
	align-items: center;
	animation: fadeIn 0.25s ease-out;
	z-index: 99999;
}

.modal-content {
	background: white;
	padding: 35px;
	max-width: 420px;
	width: 90%;
	border-radius: 18px;
	text-align: center;
	position: relative;
}

.modal-content h2 {
	margin: 0 0 20px;
	font-size: 26px;
	font-weight: 700;
}

.modal-buttons {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.btn-primary {
	background: #4e9ad3;
	color: white;
	padding: 14px 20px;
	border-radius: 10px;
	font-weight: 700;
	text-decoration: none;
}

.btn-secondary {
	background: #35d48c;
	color: #000;
	padding: 14px 20px;
	border-radius: 10px;
	font-weight: 700;
	border: none;
	cursor: pointer;
}

.modal-close {
	position: absolute;
	right: 14px;
	top: 10px;
	font-size: 26px;
	border: none;
	background: none;
	cursor: pointer;
}
.modal-list {
	text-align: left;
	margin: 15px 0 25px;
	max-height: 200px;
	overflow-y: auto;
}

.modal-list a {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	color: #4e9ad3;
	text-decoration: none;
	word-break: break-all;
}

.modal-list a:hover {
	text-decoration: underline;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.ubuntu-light {
  font-family: "Ubuntu", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.ubuntu-regular {
  font-family: "Ubuntu", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.ubuntu-medium {
  font-family: "Ubuntu", sans-serif;
  font-weight: 500;
  font-style: normal;
}

.ubuntu-bold {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.ubuntu-light-italic {
  font-family: "Ubuntu", sans-serif;
  font-weight: 300;
  font-style: italic;
}

.ubuntu-regular-italic {
  font-family: "Ubuntu", sans-serif;
  font-weight: 400;
  font-style: italic;
}

.ubuntu-medium-italic {
  font-family: "Ubuntu", sans-serif;
  font-weight: 500;
  font-style: italic;
}

.ubuntu-bold-italic {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-style: italic;
}


/* WRAPPER */
.upload-wrapper {
	width: 100%;
	max-width: 420px;
	margin: 0 auto;
	padding: 20px 16px;
}

/* DROPZONE */
.dropzone {
	width: 100%;
	padding: 32px;
	background: #f7f7f7;
	border: 2px dashed #ccc;
	border-radius: 14px;
	text-align: center;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	user-select: none;
}

.dropzone .sub {
	font-size: 14px;
	margin-top: 8px;
	font-weight: 400;
	color: #777;
}

/* FILE LIST */
.file-list {
	margin-top: 14px;
	font-size: 16px;
	line-height: 1.4;
	max-height: 120px;
	overflow-y: auto;
}

/* FIXED SEND BUTTON (mobil viktig!) */
.fixed-send {
	position: sticky;
	bottom: 0;
	width: 100%;
	background: #35d48c;
	border: none;
	padding: 14px;
	border-radius: 12px;
	font-size: 18px;
	font-weight: bold;
	margin-top: 16px;
	z-index: 50;
}

/* PROGRESS (mobil friendly) */
.progress-mobile {
	margin-top: 20px;
}



/******************* eat toast get lazy *******************/
.toast-spatial {
  padding: 14px 22px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,.92);

  background: rgba(20, 28, 48, 0.45);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow:
	0 4px 24px rgba(0,0,0,0.35),
	0 0 18px rgba(80,120,255,0.12);

  transform: translateY(10px) scale(.96);
  opacity: 0;
}

/* Visible state */
.toast-spatial.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
	opacity 0.6s cubic-bezier(.16,1,.3,1),
	transform 0.8s cubic-bezier(.16,1,.3,1);
}

/* Leaving */
.toast-spatial.hide {
  opacity: 0;
  transform: translateY(12px) scale(.97);
  transition:
	opacity 0.5s cubic-bezier(.4,0,.2,1),
	transform 0.5s cubic-bezier(.4,0,.2,1);
}

/* ⚡ ICON POP EFFECT */
.toast-icon {
  font-size: 1.1rem;
  color: #60a5fa;
  transform: scale(0.8);
  opacity: 0;
  transition: all .4s cubic-bezier(.33,1.45,.55,1);
}

.toast-spatial.show .toast-icon {
  transform: scale(1);
  opacity: 1;
}

/* Skjul hele toast-systemet på mobil */
#toastCarousel {
  display: none;
}

/* Vis kun på skjermer ≥768px (desktop/tablet) */
@media (min-width: 768px) {
  #toastCarousel {
	display: block;
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999999;
	pointer-events: none;
	isolation: isolate;
  }
}


/******************* INFO MODAL BACKDROPPED INTO THE OCEAN *******************/



/* Link styles */
.info-links {
  text-align: center;
  margin-top: 20px;
}

.info-links button {
  background: none;
  border: none;
  color: #ccc;
  font-size: 14px;
  cursor: pointer;
  margin: 0 6px;
}

.info-links button:hover {
  color: #fff;
}

#progressContainer {
	width: 100%;
	height: 10px;
	background: #e5e5e5;
	border-radius: 6px;
}

#progressBar {
	width: 0%;
	height: 100%;
	background: #4e9ad3;
	border-radius: 6px;
}

.dz-mobile {
	display: none;
}

#successModal {
  position: fixed;  /* ← DENNE ER ALT */
  z-index: 99998;
}
#successModal .modal-content,
#infoModalPanel {
  position: relative;
  z-index: 99999;
}
 /* BACKDROP */
#infoModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 99998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  inset: 0;
}

/* ACTIVE STATE */
#infoModal.info-show {
  opacity: 1;
  pointer-events: auto;
}

/* PANEL */
#infoModalPanel {
  background: #111827;
  width: 90%;
  max-width: 600px;
  height: 85vh;
  padding: 24px;
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  max-height: 90vh;         /* så den aldri går utenfor skjermen */
	overflow-y: auto;          /* scroll INNI panelet */
	overscroll-behavior: contain; /* hindrer at body scroller */
	padding: 20px; 
}

/* SLIDE UP */
#infoModal.info-show #infoModalPanel {
  transform: translateY(0);
  opacity: 1;
}

/* CLOSE BUTTON */
.info-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  color: #bbb;
  background: none;
  border: none;
  cursor: pointer;
}

#installBtn {
  padding: 12px 28px;
  width: auto;
  max-width: 340px;

  display: none; /* default hidden */
  margin: 24px auto 0;

  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: white;
  font-weight: 700;
  font-size: 16px;

  border-radius: 16px;
  box-shadow: 0 0 18px rgba(59,130,246,0.35);

  transition: all 0.25s ease;
  text-align: center;
}

#installBtn:hover {
  box-shadow: 0 0 26px rgba(59,130,246,0.55);
  transform: translateY(-3px);
}







@media (max-width: 767px) {
	.mobile-only {
	  display: inline-block !important;
	}
  }
  
 
@media (max-width: 768px) {

	body {
		display: block !important;
		padding: 0 !important;
		margin: 0 !important;
		overflow-x: hidden;
	}
		  
	.mobile-only {
	  display: none !important;
	}

	.container {
		flex-direction: column;
		gap: 0;
		margin: 0;
		padding: 0;
		width: 100%;
		max-width: 100%;
	}

	.panel-left {
		width: 100%;
		padding: 30px 20px;
		text-align: center;
	}

	.panel-center {
		width: 100%;
		border-radius: 0;
		border: none;
		padding: 25px 20px;
		margin-top: 0;
	}

	.dropzone {
		width: 100%;
		min-height: 180px;
		padding: 30px;
		font-size: 18px;
	}
}


@media (max-width: 600px) {

	/* FIX 1 — Don't center entire screen on mobile */
	body {
		display: block !important;
		min-height: auto !important;
		padding: 15px 0;
	}
	
	.dz-desktop {
		display: none;
	}
	.dz-mobile {
		display: block;
		font-size: 16px;
		line-height: 1.4;
	}
	.dz-mobile .sub {
		font-size: 14px;
		color: #4e9ad3;
		font-weight: 500;
		margin-top: 6px;
	}

	/* FIX 2 — Stack layout */
	.container {
		flex-direction: column;
		gap: 20px;
		padding: 10px;
		width: 100%;
		max-width: 100%;
	}

	/* Hide left panel on mobile */
	.panel-left {
		display: none !important;
	}

	/* Main panel full width */
	.panel-center {
		width: 100% !important;
		max-width: 92%;
		padding: 20px;
		margin: 0 auto;
	}

	/* Dropzone — stable and tappable */
	.dropzone {
		padding: 20px !important;
		min-height: 160px;
		font-size: 16px;
	}

	/* File list should NOT push layout */
	#fileName {
		margin-bottom: 30px; /* room for sticky button */
	}

	/* FIX 3 — Sticky send button */
	
	/* Progress box below file list */
	#progressBox {
		margin-top: 20px;
		width: 100%;
		padding-bottom: 100px; /* avoid overlapping sticky button */
	}

	/* Modal — 100% mobile layout */
	.modal-content {
		width: 95% !important;
		max-width: 95% !important;
		padding: 25px !important;
		margin: 0 auto;
		border-radius: 14px;
		position: relative;
		z-index: 99999;
	}

	.modal-buttons {
		flex-direction: column !important;
	}

	.btn-primary,
	.btn-secondary {
		width: 100% !important;
		padding: 14px !important;
		font-size: 16px !important;
	}
	
	.compression-options {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
		width: 100%;
	  }
	
	  .compression-options label {
		margin: 0;
		font-size: 14px;
	  }
	
	  .compression-options select {
		width: 100%;
		font-size: 16px;
		padding: 10px 14px;
		border-radius: 12px;
	  }
	
	  /* Spesifikk linje-formatet */
	  .format-row {
		width: 100%;
		display: flex;
		flex-direction: column;
		gap: 8px;
	  }
	
	  .bg-row {
		width: 100%;
		display: flex;
		flex-direction: column;
		gap: 8px;
	  }
}


#successModal > div,
#successModal .modal-content {
	position: relative;
	z-index: 99999 !important;
}
