/* Role photograph of the Dentist, Clinic and Coordinator panels
   (templates/public/professionals/_panel_photo.html), used on the public
   panel pages and on the panel sign-in pages.

   The photos keep their native 4:3 ratio: every crop that was tried cut a
   face, the wall emblem or the X-ray labels. The only motion is a very slow
   3 % zoom; each role zooms from the corner that holds its important edge
   (dentist: the X-ray labels on the right; clinic: the emblem at the top),
   so nothing that matters leaves the frame. panel-photo.js switches it on
   only without prefers-reduced-motion, and pauses it off screen or on request. */

.panel-photo {
  position: relative;
  margin: 0;
}
.panel-photo__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  background: #0d2240;
}
.panel-photo__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 50% 50%;
}
.panel-photo--dentist .panel-photo__frame img { transform-origin: 100% 0; }
.panel-photo--clinic .panel-photo__frame img { transform-origin: 50% 0; }

@media (prefers-reduced-motion: no-preference) {
  .panel-photo.is-animated .panel-photo__frame img {
    animation: panelPhotoDrift 26s ease-in-out infinite alternate;
  }
  .panel-photo.is-paused .panel-photo__frame img,
  .panel-photo.is-offscreen .panel-photo__frame img { animation-play-state: paused; }
}
@keyframes panelPhotoDrift {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}

/* Pause / play: bottom-left, clear of the faces and of the Lupi button. */
.panel-photo__toggle {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(10, 26, 51, .55);
  color: #fff;
  cursor: pointer;
  transition: background-color .2s ease;
}
.panel-photo__toggle[hidden] { display: none; }
.panel-photo__toggle:hover { background: rgba(10, 26, 51, .8); }
.panel-photo__toggle:focus-visible { outline: 3px solid #8ec5f0; outline-offset: 2px; }
.panel-photo__toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.panel-photo__icon-play { fill: currentColor !important; stroke-width: 1.2 !important; }
.panel-photo__icon-play,
.panel-photo.is-paused .panel-photo__icon-pause { display: none; }
.panel-photo.is-paused .panel-photo__icon-play { display: block; }
