/*
#	Project: fileearner - Engineering with logic, software with soul.
#
#	This is NOT a freeware, use is subject to license terms.
#
#	Website: https://fileearner.com
#
#	Author: Along ( fileearner@outlook.com)
#
#	$Id$
#
#	Copyright (C) 2008-2083 fileearner Team. All Rights Reserved.
*/

/* Floating “back to top” (public site, user panel, admin). Below my-modal layers. */
.fe-back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: #fff;
  background: linear-gradient(145deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  z-index: 9000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, box-shadow 0.2s ease;
}

.fe-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.fe-back-to-top:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.fe-back-to-top:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.fe-back-to-top:active {
  transform: translateY(1px);
}

/*
 * Theme --fe-accent (size + gradient): user panel + public marketing/share shells.
 * Position stays bottom-right like .fe-back-to-top (do not set left: / right: auto here).
 */
body:is(
    .page-panel:not(.page-admin),
    .page-home,
    .page-help,
    .page-terms,
    .page-privacy,
    .page-contact,
    .page-about,
    .page-vip,
    .page-pay-vip,
    .page-pay-vip-return,
    .page-stub,
    .page-auth,
    .page-share-body
  )
  .fe-back-to-top {
  width: 2.875rem;
  height: 2.875rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(
    155deg,
    color-mix(in srgb, var(--fe-accent, #3b82f6) 88%, #ffffff) 0%,
    var(--fe-accent, #2563eb) 48%,
    color-mix(in srgb, var(--fe-accent, #1d4ed8) 75%, #0f172a) 100%
  );
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 8px 22px color-mix(in srgb, var(--fe-accent, #3b82f6) 28%, transparent),
    0 0 0 1px color-mix(in srgb, var(--fe-accent, #3b82f6) 22%, rgba(255, 255, 255, 0.85));
}

body:is(
    .page-panel:not(.page-admin),
    .page-home,
    .page-help,
    .page-terms,
    .page-privacy,
    .page-contact,
    .page-about,
    .page-vip,
    .page-pay-vip,
    .page-pay-vip-return,
    .page-stub,
    .page-auth,
    .page-share-body
  )
  .fe-back-to-top:hover {
  filter: brightness(1.04) saturate(1.05);
  box-shadow:
    0 12px 28px color-mix(in srgb, var(--fe-accent, #3b82f6) 34%, transparent),
    0 0 0 1px color-mix(in srgb, var(--fe-accent, #3b82f6) 30%, rgba(255, 255, 255, 0.9));
  transform: translateY(-2px);
}

body:is(
    .page-panel:not(.page-admin),
    .page-home,
    .page-help,
    .page-terms,
    .page-privacy,
    .page-contact,
    .page-about,
    .page-vip,
    .page-pay-vip,
    .page-pay-vip-return,
    .page-stub,
    .page-auth,
    .page-share-body
  )
  .fe-back-to-top.is-visible:hover {
  transform: translateY(-2px);
}

body:is(
    .page-panel:not(.page-admin),
    .page-home,
    .page-help,
    .page-terms,
    .page-privacy,
    .page-contact,
    .page-about,
    .page-vip,
    .page-pay-vip,
    .page-pay-vip-return,
    .page-stub,
    .page-auth,
    .page-share-body
  )
  .fe-back-to-top:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--fe-accent, #3b82f6) 55%, #ffffff);
  outline-offset: 3px;
}

body:is(
    .page-panel:not(.page-admin),
    .page-home,
    .page-help,
    .page-terms,
    .page-privacy,
    .page-contact,
    .page-about,
    .page-vip,
    .page-pay-vip,
    .page-pay-vip-return,
    .page-stub,
    .page-auth,
    .page-share-body
  )
  .fe-back-to-top:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

@media (max-width: 768px) {
  .fe-back-to-top {
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.35rem;
  }

  body:is(
      .page-panel:not(.page-admin),
      .page-home,
      .page-help,
      .page-terms,
      .page-privacy,
      .page-contact,
      .page-about,
      .page-vip,
      .page-pay-vip,
      .page-pay-vip-return,
      .page-stub,
      .page-auth,
      .page-share-body
    )
    .fe-back-to-top {
    width: 2.625rem;
    height: 2.625rem;
    font-size: 1.4rem;
  }
}
