/* =============================== Header compatto =============================== */ header { padding: 4px 10px; /* era 10px 15px */ background: #333; color: white; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; } /* Titolo più piccolo e senza margini extra */ header h1 { font-size: 18px; /* ridotto */ line-height: 1.1; margin: 0; } /* Contenitore bottoni in alto a destra */ .top-buttons { display: flex; gap: 6px; /* era 10px */ } /* Bottoni icona più compatti */ .icon-btn { background: none; border: none; font-size: 18px; /* era 22px */ padding: 3px 6px; /* era 6px 10px */ cursor: pointer; border-radius: 6px; color: white; line-height: 1; min-height: 32px; /* tap target minimo desktop */ min-width: 32px; } .icon-btn:hover { background: rgba(255,255,255,0.15); } /* Logout rotondo: riduciamo la “bolla” */ .icon-btn.logout-btn { --size: 28px; /* era 36px */ width: var(--size); height: var(--size); padding: 0; display: inline-flex; align-items: center; justify-content: center; } /* PNG del logout in scala con l’header */ .logout-icon { width: 18px; /* era 22px */ height: 18px; display: block; filter: brightness(0) invert(1); image-rendering: -webkit-optimize-contrast; } /* =============================== Visibilità Logout robusta =============================== */ /* Base: nascosto (prima del login o se non autenticato) */ #logoutBtn { display: none; } /* Quando autenticato, mostra il bottone coerente con gli altri icon-btn */ body.authenticated #logoutBtn { display: inline-flex; align-items: center; justify-content: center; } /* =============================== Toggle Photos / Activities =============================== */ .mode-toggle { display: flex; gap: 8px; margin-left: 20px; } .mode-toggle button { padding: 6px 12px; border: 1px solid #ccc; background: #f5f5f5; border-radius: 6px; cursor: pointer; font-size: 14px; color: #333; } .mode-toggle button.active { background: #007bff; color: white; border-color: #007bff; } .mode-toggle { background: transparent; color: #fff; border: 1px solid #fff; border-radius: 10px; padding: 8px 10px; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.2s ease; } .mode-toggle:hover { background: #111; } .mode-toggle:active { transform: scale(0.96); } /* Barra superiore in modalità selezione */ .selection-bar { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; margin-left: 8px; color: #fff; font-size: 14px; } .selection-bar[hidden], .selection-actions-menu[hidden] { display: none !important; } .selection-bar #selectionCount { white-space: nowrap; } .selection-actions-wrap { position: relative; } .selection-actions-menu { position: absolute; z-index: 500; top: calc(100% + 8px); right: 0; width: min(300px, calc(100vw - 24px)); padding: 6px; border: 1px solid rgba(0, 0, 0, .08); border-radius: 12px; background: #fff; color: #222; box-shadow: 0 8px 28px rgba(0, 0, 0, .24); font-size: 14px; line-height: 1.4; transform-origin: top right; } .selection-menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; } .selection-menu-item + .selection-menu-item { border-top: 1px solid #eee; border-radius: 0 0 8px 8px; } .selection-menu-item:hover, .selection-menu-item:focus-visible { background: #f1f3f5; outline: none; } .selection-menu-item:active { background: #e7e9ec; } .selection-menu-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; flex: 0 0 24px; font-size: 18px; } .selection-menu-label { flex: 1; font-weight: 500; } .selection-menu-hint { color: #777; font-size: 11px; white-space: nowrap; } @media (hover: none) { .selection-menu-item:hover { background: transparent; } } body.selection-mode header > h1, body.selection-mode #modeToggle { display: none !important; } body.selection-mode .top-buttons > :not(#logoutBtn) { display: none !important; } body.selection-mode .topbar { gap: 6px; } body.selection-mode .selection-bar { display: flex; } body.selection-mode .selection-bar[hidden] { display: none !important; } /* Android-like contextual menu */ /* Android-like contextual menu */ .selection-actions-menu { box-sizing: border-box; width: min(280px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; border: 1px solid rgba(127, 127, 127, .16); border-radius: 16px; background: #fff; color: #202124; box-shadow: 0 2px 6px rgba(0, 0, 0, .12), 0 8px 24px rgba(0, 0, 0, .18); font-size: 14px; line-height: 1.4; transform-origin: top right; animation: selection-menu-in 130ms ease-out; -webkit-tap-highlight-color: transparent; } .selection-actions-menu.opens-up { top: auto; bottom: calc(100% + 8px); transform-origin: bottom right; } .selection-menu-item, .selection-menu-item + .selection-menu-item { box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 12px 14px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; } .selection-menu-item + .selection-menu-item { margin-top: 2px; } .selection-menu-item:hover, .selection-menu-item:focus-visible { background: rgba(60, 64, 67, .08); outline: none; } .selection-menu-item:active { background: rgba(60, 64, 67, .14); } .selection-menu-icon { width: 24px; height: 24px; flex: 0 0 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; } .selection-menu-label { flex: 1; font-weight: 500; } .selection-menu-hint { color: #70757a; font-size: 12px; white-space: nowrap; } @keyframes selection-menu-in { from { opacity: 0; transform: scale(.96) translateY(-3px); } to { opacity: 1; transform: scale(1) translateY(0); } } /* Desktop: apri il menu verso destra */ @media (min-width: 601px) { .selection-actions-menu { left: 0; right: auto; transform-origin: top left; } .selection-actions-menu.opens-up { transform-origin: bottom left; } } @media (prefers-color-scheme: dark) { .selection-actions-menu { background: #2b2b2b; color: #f1f1f1; border-color: rgba(255, 255, 255, .10); box-shadow: 0 2px 6px rgba(0, 0, 0, .28), 0 8px 24px rgba(0, 0, 0, .38); } .selection-menu-item:hover, .selection-menu-item:focus-visible { background: rgba(255, 255, 255, .09); } .selection-menu-item:active { background: rgba(255, 255, 255, .15); } .selection-menu-hint { color: #bdbdbd; } } @media (prefers-reduced-motion: reduce) { .selection-actions-menu { animation: none; } } /* Mobile centered Android-style popup */ @media (max-width: 600px) { .selection-actions-wrap { position: static; } .selection-actions-menu { position: fixed; top: 50%; left: 50%; right: auto; bottom: auto; width: min(320px, calc(100vw - 40px)); max-width: calc(100vw - 40px); max-height: min(70dvh, 420px); transform: translate(-50%, -50%); transform-origin: center; z-index: 2000; } .selection-actions-menu.opens-up { top: 50%; left: 50%; right: auto; bottom: auto; } @keyframes selection-menu-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } } }