/* Cloud import (FP24_CLOUD_IMPORT): the «Da cloud» control of the calculator.
   Site tokens: blue #0047FE / #0036DA, text #181818 / #696E72, greys #ADB4B8 #F0F0F0 #F5F5F5, font inherited (Mulish). */
.cloudimp { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; max-width: 420px; margin: 18px auto 0; text-align: center; cursor: default; }
/* 2026-12-04: blue «Scegli un file» + one tile per service (same words and order as the app) */
.cloudimp__pick {
	display: flex; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box; width: 100%;
	min-height: 52px; padding: 10px 16px; border: 0; border-radius: 12px; background: #0047FE; color: #FFFFFF;
	font: inherit; font-weight: 800; font-size: 17px; line-height: 1.2; cursor: pointer;
}
.cloudimp__pick:hover { background: #0036DA; }
.cloudimp__bartitle { display: none; }
.cloudimp__or { margin: 2px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #696E72; }
.cloudimp__tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cloudimp__tiles--one { grid-template-columns: minmax(0, 1fr); }
.cloudimp__tile {
	display: flex; align-items: center; gap: 10px; box-sizing: border-box; min-width: 0; min-height: 64px; padding: 10px 12px;
	border: 1.5px solid #ADB4B8; border-radius: 12px; background: #FFFFFF; color: #181818; font: inherit; text-align: left; cursor: pointer;
}
.cloudimp__tile:hover { border-color: #0047FE; }
.cloudimp__pick:focus-visible, .cloudimp__tile:focus-visible, .cloudimp__winclose:focus-visible { outline: 2px solid #0036DA; outline-offset: 2px; }
.cloudimp__tile--loading { cursor: progress; opacity: .7; }
.cloudimp--busy .cloudimp__tile { opacity: .55; pointer-events: none; }
.cloudimp__mark { flex: 0 0 26px; width: 26px; height: 26px; object-fit: contain; }
.cloudimp__mark--none { display: inline-flex; color: #696E72; }
.cloudimp__tiletext { display: flex; flex-direction: column; min-width: 0; }
.cloudimp__name { font-size: 15px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.cloudimp__sub { font-size: 12px; line-height: 1.3; color: #696E72; }
.cloudimp__hint { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; line-height: 1.4; color: #555B5F; text-align: left; }
.cloudimp__hint svg { flex: 0 0 16px; }
.cloudimp__tm { margin: 0; font-size: 11.5px; line-height: 1.4; color: #696E72; text-align: left; }
.cloudimp__status { white-space: pre-line; margin: 0; font-size: 14px; line-height: 1.4; color: #181818; text-align: left; overflow-wrap: anywhere; }
.cloudimp__status[hidden] { display: none; }
.cloudimp__status--error { color: #B42318; font-weight: 600; }

/* with files in the calculator: one slim row of small tiles on top of the file list («Aggiungi PDF» is already there) */
.cloudimp--row { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 10px; max-width: none; margin: 0 0 10px; grid-column: 1 / -1; flex: 0 0 auto; }
.cloudimp--row .cloudimp__pick, .cloudimp--row .cloudimp__or, .cloudimp--row .cloudimp__hint, .cloudimp--row .cloudimp__tm, .cloudimp--row .cloudimp__sub { display: none; }
.cloudimp--row .cloudimp__tiles { display: flex; gap: 8px; }
.cloudimp--row .cloudimp__tile { min-height: 44px; padding: 6px 12px; gap: 8px; }
.cloudimp--row .cloudimp__mark { flex-basis: 20px; width: 20px; height: 20px; }
.cloudimp--row .cloudimp__name { font-size: 14px; font-weight: 700; }
.cloudimp--row .cloudimp__status { flex: 1 1 200px; order: -1; }

/* a window of ours for the pickers that live inside the page (Box, OneDrive) */
.cloudimp__back { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(24, 24, 24, .55); }
.cloudimp__win { display: flex; flex-direction: column; box-sizing: border-box; width: min(1040px, 100%); height: min(720px, 100%); border-radius: 12px; background: #FFFFFF; overflow: hidden; }
.cloudimp__winhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; border-bottom: 1px solid #F0F0F0; font-weight: 700; color: #181818; }
.cloudimp__winclose { width: 44px; height: 44px; border: 0; border-radius: 8px; background: none; font-size: 28px; line-height: 1; color: #181818; cursor: pointer; }
.cloudimp__winclose:hover { background: #F5F5F5; }
.cloudimp__winbody { position: relative; flex: 1 1 auto; min-height: 0; }
.cloudimp__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 575px) {
	.cloudimp { margin-top: 14px; }
	.cloudimp__back { padding: 0; }
	.cloudimp__win { width: 100%; height: 100%; border-radius: 0; }
	.cloudimp--row { justify-content: center; }
}

/* 04/12: Google's file window is placed for the scroll position it opened at; pinned to the screen instead, and the page
   behind it does not scroll while it is open (phone opened mid-page: the window sat half off the screen) */
html.cloudimp-picker-open, html.cloudimp-picker-open body { overflow: hidden !important; }
html.cloudimp-picker-open .picker-dialog-bg { position: fixed !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; }
html.cloudimp-picker-open .picker-dialog { position: fixed !important; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important; max-width: 100vw; max-height: 100vh; max-height: 100dvh; }

/* 04/12 design 1: with files, ONE «Aggiungi file» block in the list's head: [from this device] [Google Drive] [Dropbox],
   three equal buttons; «Seleziona tutto» / «Elimina tutto» on a light row under it. «Aggiungi PDF» (it holds the file
   input) is only hidden while the block is there: with the switch off nothing changes */
.has-cloudimp .calculate__upload-label { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; padding: 0 !important; margin: 0 !important; border: 0 !important; }
.cloudimp--bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: none; margin: 0 0 12px; padding: 14px; box-sizing: border-box; background: #FFFFFF; border-radius: 16px; box-shadow: 0 1px 3px rgba(24, 24, 24, .08); text-align: left; }
.cloudimp--bar.cloudimp--n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cloudimp--bar.cloudimp--n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cloudimp--bar .cloudimp__bartitle { display: block; grid-column: 1 / -1; font-size: 15px; font-weight: 800; line-height: 1.3; color: #181818; }
.cloudimp--bar .cloudimp__tiles { display: contents; }
.cloudimp--bar .cloudimp__or, .cloudimp--bar .cloudimp__tm, .cloudimp--bar .cloudimp__sub { display: none; }
.cloudimp--bar .cloudimp__pick, .cloudimp--bar .cloudimp__tile { flex-direction: column; justify-content: center; align-items: center; gap: 4px; min-width: 0; min-height: 64px; padding: 8px 4px; border-radius: 12px; font-size: 13px; font-weight: 700; line-height: 1.2; text-align: center; }
.cloudimp--bar .cloudimp__pick svg { width: 22px; height: 22px; }
.cloudimp--bar .cloudimp__mark { flex: 0 0 auto; width: 22px; height: 22px; }
.cloudimp--bar .cloudimp__tiletext { align-items: center; }
.cloudimp--bar .cloudimp__name { font-size: 13px; font-weight: 700; }
.cloudimp--bar .cloudimp__hint { grid-column: 1 / -1; font-size: 12px; }
.cloudimp--bar .cloudimp__status { grid-column: 1 / -1; }
@media (min-width: 577px) {
	/* computers and tablets (the list head is a grid, calculate.js card2Style): «I tuoi file» on row 1, the three buttons
	   on row 2 across the whole column, «Seleziona tutto» / «Elimina tutto» on row 3, the list starts under them */
	.calculate .has-file.has-cloudimp .cloudimp--bar { grid-column: 1 / -1; grid-row: 2; margin: 0; padding: 0; background: none; box-shadow: none; }
	.cloudimp--bar .cloudimp__bartitle, .cloudimp--bar .cloudimp__hint { display: none; }
	.calculate .has-file.has-cloudimp .has-file__select, .calculate .has-file.has-cloudimp .has-file__delete { grid-row: 3; }
	.calculate .has-file.has-cloudimp .calculate__upload-files { height: calc(100% - 208px); }
}
@media (max-width: 576px) {
	.has-cloudimp .calculate__upload-first { display: flex !important; justify-content: space-between !important; align-items: center; gap: 12px; }
	.has-cloudimp .has-file__select { order: 1; }
	.has-cloudimp .has-file__delete { order: 2; }
	/* phone: the block takes its own full row above Seleziona/Elimina, and the file list follows it in the page
	   (it was laid over the head at a fixed 60 px and covered the block) */
	.has-cloudimp .calculate__upload-wrapper { flex-wrap: wrap; }
	.has-cloudimp .cloudimp--bar { flex: 0 0 100%; order: -1; }
	.calculate .has-file.has-cloudimp .calculate__upload { top: 0; }
	.has-cloudimp .calculate__upload-files.active { position: static; height: auto; overflow: visible; padding: 12px 0 0; background: none; }
}
