/* WORKHOUR | Fil: workhour-media.css | Version: 2.3.1 | Senast ändrad: 2026-09-29 */
/* Den delade mediakomponenten ska vara komplett även på fristående publika sidor. */
.wh-shared-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:12px;margin:0}
.wh-shared-tile{position:relative;display:block;overflow:hidden;padding:0;min-width:0;border:1px solid #e9eaec;border-radius:12px;background:#fff}
.wh-shared-view{width:100%;height:100%;padding:7px;border:0;background:transparent;color:inherit;display:grid;gap:6px;align-content:start;text-align:left;cursor:pointer}
.wh-shared-view>.wh-p-gallery-thumb{display:block;position:relative;overflow:hidden;border-radius:7px;background:#f3f5f7}
.wh-shared-view>.wh-p-gallery-thumb img{display:block;width:100%;aspect-ratio:1.15;object-fit:cover}
.wh-shared-view>i{font-size:29px;display:grid;place-items:center;aspect-ratio:1.15}
.wh-shared-filename{font-size:12px;overflow-wrap:anywhere}
.wh-shared-remove{position:absolute;right:5px;top:5px;width:30px;height:30px;border:0;border-radius:50%;background:#fff;color:#a33340;cursor:pointer;box-shadow:0 1px 7px #0003}
.wh-report-policy{display:none!important}.wh-report-project-description:empty{display:none!important}.wh-report-uploads .wh-upload[data-upload-kind=report] .wh-upload-composer{align-items:center}.wh-report-uploads .wh-upload[data-upload-kind=report] .wh-upload-composer-actions{align-items:center}.wh-report-uploads .wh-upload[data-upload-kind=report] .wh-upload-toggle,.wh-report-uploads .wh-upload[data-upload-kind=report] .wh-upload-action{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;line-height:1}.wh-report-detail-heading{display:none!important}

/* En gemensam preview för projekt, projektredigering och tidrapporter. */

.wh-media-lightbox{position:fixed;inset:0;z-index:99999;display:none;align-items:center;justify-content:center;background:#111e;color:white}

.wh-media-lightbox[style*="display: block"]{display:flex!important}

.wh-media-lightbox img{max-width:calc(100vw - 110px);max-height:calc(100dvh - 90px);object-fit:contain}

.wh-media-lightbox button{position:absolute;z-index:1;border:0;background:#ffffff25;color:white;cursor:pointer;border-radius:50%;width:42px;height:42px;font-size:30px}

.wh-media-lightbox-close{top:15px;right:15px}
.wh-media-lightbox-prev{left:12px}
.wh-media-lightbox-next{right:12px}

.wh-media-lightbox-counter{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);font-size:13px}
.wh-media-lightbox img{max-width:calc(100vw - 72px)}
.wh-media-lightbox button{width:34px;height:34px}

.wh-media-lightbox video{max-width:90vw;max-height:85vh;position:relative;z-index:2}
.wh-shared-preview{display:flex!important}
.wh-shared-preview .wh-media-lightbox-close,.wh-shared-preview .wh-media-lightbox-prev,.wh-shared-preview .wh-media-lightbox-next{display:flex;align-items:center;justify-content:center;padding:0;line-height:1}

/* Preview ska alltid vara ett overlay ovanpå sidan, även utan äldre projekt-CSS. */
.wh-media-lightbox.wh-shared-preview{position:fixed!important;inset:0!important;z-index:99999!important;display:flex!important;align-items:center;justify-content:center;background:rgba(17,17,17,.93);color:#fff}
.wh-media-lightbox.wh-shared-preview .wh-media-lightbox-close{border-radius:50%!important}


/* iPhone safe area: keep preview close control below the status bar. */
.wh-media-lightbox .wh-media-lightbox-close,
.wh-media-lightbox.wh-shared-preview .wh-media-lightbox-close {
  top: calc(15px + env(safe-area-inset-top, 0px)) !important;
  right: calc(15px + env(safe-area-inset-right, 0px)) !important;
  width: 44px;
  height: 44px;
  z-index: 5;
}
