/* Shared feedback for public pages and the cabinet. Individual scale preserves
   transforms used to position controls; no document layout is changed. */
body :is(
  button, select, summary, .staff-collapsible-header[role="button"], input[type="submit"], input[type="button"],
  .btn, .p-button, .p-link, .p-account, nav a, .w-card-menu a,
  .staff-link-btn, .staff-client-vin-btn, .staff-invoice-file-btn,
    a.contact-link-card[href], a.contact-map-link[href]
):not(:disabled):not([aria-disabled="true"]):not(:has(img)):not(
  .viewer-container *, .photo-preview *, .staff-vin-photo-viewer *, .exsa-private-file-viewer *,
  .staff-vin-photo-nav, .staff-vin-photo-thumb
){
  transition:scale .18s ease, background-color .18s ease,
    border-color .18s ease, color .18s ease, box-shadow .18s ease !important;
}

/* Clip only the image area. Captions, action rows and the full-size viewer
   retain their own geometry and zoom behavior. */
.track-overview-media,.h-live-car-media{overflow:hidden}
.h-live-car-media > img{display:block;width:100%;height:auto;aspect-ratio:1.5;object-fit:cover}
.publication-photo > a{display:block;overflow:hidden;border-radius:12px}
:is(.sale-car-photo, .catalog-thumbnails button, .gallery .photo,
  .staff-sale-gallery-image, .staff-sale-tracking-photo, .staff-certification-file-preview,
    .staff-vin-photo-thumb, .publication-photo > a,
  .track-overview-media, .h-demo-media, .h-live-car-media) > img{
  transition:scale .2s ease !important;
}

@media (hover:hover) and (pointer:fine){
  body :is(
    button, select, summary, .staff-collapsible-header[role="button"], input[type="submit"], input[type="button"],
    .btn, .p-button, .p-link, .p-account, nav a, .w-card-menu a,
    .staff-link-btn, .staff-client-vin-btn, .staff-invoice-file-btn,
    a.contact-link-card[href], a.contact-map-link[href]
  ):not(:disabled):not([aria-disabled="true"]):not(:has(img)):not(
    .viewer-container *, .photo-preview *, .staff-vin-photo-viewer *, .exsa-private-file-viewer *,
    .staff-vin-photo-nav, .staff-vin-photo-thumb
  ):hover{
    scale:1.025;
  }
  body :is(nav a, summary, .p-account, .staff-collapsible-header[role="button"]):not([aria-disabled="true"]):hover{
    color:var(--p-accent, #d6bd91) !important;
  }
  body :is(.btn, .p-button):not(:disabled):not([aria-disabled="true"]):hover{
    box-shadow:0 0 0 1px #d6bd9126 !important;
  }
  :is(.sale-car-photo, .catalog-thumbnails button:not(:disabled), .gallery .photo,
    .staff-sale-gallery-image, .staff-sale-tracking-photo, .staff-certification-file-preview,
    .staff-vin-photo-thumb, .publication-photo > a,
    .track-overview-media, .h-demo-media, .h-live-car-media):not(:disabled):not([aria-disabled="true"]):hover > img{
    scale:1.04;
  }
}

/* Touch responds during the press only, so a tap never leaves an enlarged
   control behind or requires a second tap to perform the action. */
@media (hover:none) and (pointer:coarse){
  body :is(
    button, select, summary, .staff-collapsible-header[role="button"], input[type="submit"], input[type="button"],
    .btn, .p-button, .p-link, .p-account, nav a, .w-card-menu a,
    .staff-link-btn, .staff-client-vin-btn, .staff-invoice-file-btn,
    a.contact-link-card[href], a.contact-map-link[href]
  ):not(:disabled):not([aria-disabled="true"]):not(:has(img)):not(
    .viewer-container *, .photo-preview *, .staff-vin-photo-viewer *, .exsa-private-file-viewer *,
    .staff-vin-photo-nav, .staff-vin-photo-thumb
  ):active{
    scale:.98;
  }
}

/* Respect the device preference by removing motion itself, not merely making
   the change instantaneous. Existing keyboard focus outlines remain intact. */
@media (prefers-reduced-motion:reduce){
  body :is(
    button, select, summary, .staff-collapsible-header[role="button"], input[type="submit"], input[type="button"],
    .btn, .p-button, .p-link, .p-account, nav a, .w-card-menu a,
    .staff-link-btn, .staff-client-vin-btn, .staff-invoice-file-btn,
    a.contact-link-card[href], a.contact-map-link[href]
  ):not(:disabled):not([aria-disabled="true"]):not(:has(img)):not(
    .viewer-container *, .photo-preview *, .staff-vin-photo-viewer *, .exsa-private-file-viewer *,
    .staff-vin-photo-nav, .staff-vin-photo-thumb
  ),
  :is(.sale-car-photo, .catalog-thumbnails button, .gallery .photo,
    .staff-sale-gallery-image, .staff-sale-tracking-photo, .staff-certification-file-preview,
    .staff-vin-photo-thumb, .publication-photo > a,
    .track-overview-media, .h-demo-media, .h-live-car-media) > img{
    scale:none !important;
    transition:none !important;
  }
}

/* Contact inputs use a border cue; typing does not move or resize the field. */
.page-contacts .lead-field .input{transition:border-color .18s ease,box-shadow .18s ease}
@media (hover:hover) and (pointer:fine){
  .page-contacts .lead-field .input:not(:disabled):hover{border-color:var(--p-accent)}
  a.contact-link-card[href]:hover .contact-link-text strong,
  a.contact-map-link[href]:hover .contact-map-copy>b{color:var(--p-accent)}
}
@media (prefers-reduced-motion:reduce){
  .page-contacts .lead-field .input{transition:none}
}
