/* =========================================================
   UFY PHONE — HISTORIAL PRIVADO DE CAMISAS
   Panel a media altura, expandible.
   ========================================================= */

.ufy-shirts-history-layer {
  position: fixed;
  z-index: 31000;
  overflow: hidden;
  isolation: isolate;
  box-sizing: border-box;

  color: #19122d;
  font-family: inherit;
}

.ufy-shirts-history-layer *,
.ufy-shirts-history-layer *::before,
.ufy-shirts-history-layer *::after {
  box-sizing: border-box;
}

.ufy-shirts-history-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 12, 40, 0.24);
}

.ufy-shirts-history-sheet {
  position: absolute;
  bottom: 0;
  left: 0;

  width: 100%;
  height: 54%;
  max-height: 100%;

  display: flex;
  flex-direction: column;
  overflow: hidden;

  border: 1px solid rgba(var(--ufy-rgb-255,255,255,255),0.9);
  border-radius: 32px 32px 0 0;

  background:
    radial-gradient(
      circle at 12% 5%,
      rgba(var(--ufy-rgb-255,255,255,255),0.91),
      transparent 48%
    ),
    linear-gradient(
      145deg,
      rgba(240, 231, 255, 0.95),
      rgba(225, 215, 246, 0.91)
    );

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  box-shadow:
    0 -12px 40px rgba(45, 22, 85, 0.2),
    inset 0 1px 0 rgba(var(--ufy-rgb-255,255,255,255),0.9);

  transition: height 240ms ease;
}

.ufy-shirts-history-sheet.is-expanded {
  height: 96%;
}

.ufy-shirts-history-sheet.is-dragging {
  transition: none;
}

.ufy-shirts-history-grip {
  flex: 0 0 auto;
  display: grid;
  place-items: center;

  width: 100%;
  height: 28px;
  padding: 0;
  border: 0;

  color: #7450c5;
  background: transparent;
  cursor: ns-resize;
  touch-action: none;
}

.ufy-shirts-history-grip::before {
  content: "";
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: #b298e6;
}

.ufy-shirts-history-header {
  position: relative;
  flex: 0 0 auto;
  padding: 0 16px 12px;
  text-align: center;
}

.ufy-shirts-history-title {
  margin: 0;
  padding: 0 25px;

  color: #171027;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 650;
  line-height: 1.2;
}



.ufy-shirts-history-code {
  display: inline-block;
  margin-top: 9px;
  padding: 5px 14px;
  border-radius: 13px;

  color: #763fee;
  background: rgba(165, 131, 228, 0.19);
  font-size:calc(14px * var(--ufy-font-scale,1));
  font-weight: 700;
}

.ufy-shirts-history-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;

  margin-top: 12px;
  padding: 4px;
  border: 1px solid rgba(137, 101, 198, 0.22);
  border-radius: 15px;
  background: rgba(var(--ufy-rgb-255,255,255,255),0.25);
}

.ufy-shirts-history-tab {
  min-width: 0;
  min-height: 40px;
  padding: 7px 6px;
  border: 0;
  border-radius: 11px;

  color: #685782;
  background: transparent;
  font: inherit;
  font-size:calc(12px * var(--ufy-font-scale,1));
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
}

.ufy-shirts-history-tab[aria-selected="true"] {
  color: #713bdb;
  background: rgba(var(--ufy-rgb-255,255,255,255),0.8);
  box-shadow: 0 3px 10px rgba(84, 48, 137, 0.1);
}

.ufy-shirts-history-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 16px;

  margin: 10px 0 0;
  padding: 8px;
  border: 1px solid rgba(137, 101, 198, 0.22);
  border-radius: 13px;

  color: #655182;
  font-size:calc(12px * var(--ufy-font-scale,1));
  line-height: 1.35;
}

.ufy-shirts-history-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 16px 12px;
  scrollbar-width: thin;
  scrollbar-color: #b79adb transparent;
}

.ufy-shirts-history-date {
  margin: 15px 5px 8px;
  color: #8750dc;
  font-size:calc(12px * var(--ufy-font-scale,1));
  font-weight: 750;
}

.ufy-shirts-history-group {
  overflow: hidden;
  border: 1px solid rgba(160, 131, 201, 0.28);
  border-radius: 14px;
  background: rgba(var(--ufy-rgb-255,255,255,255),0.33);
}

.ufy-shirts-history-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.ufy-shirts-history-row + .ufy-shirts-history-row {
  border-top: 1px solid rgba(154, 126, 192, 0.2);
}

.ufy-shirts-history-icon {
  display: grid;
  place-items: center;

  width: 38px;
  height: 43px;
  border: 1px solid rgba(150, 109, 214, 0.25);
  border-radius: 11px;

  color: #7942dc;
  background: rgba(238, 228, 255, 0.55);
}

.ufy-shirts-history-icon svg {
  width: 24px;
  height: 24px;
}

.ufy-shirts-history-copy {
  min-width: 0;
}

.ufy-shirts-history-row-title {
  display: block;
  color: #20172e;
  font-size:calc(13px * var(--ufy-font-scale,1));
  font-weight: 650;
  overflow-wrap: anywhere;
}

.ufy-shirts-history-person {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;

  color: #72508f;
  font-size:calc(12px * var(--ufy-font-scale,1));
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

a.ufy-shirts-history-person {
  color: #7b39ee;
}

.ufy-shirts-history-avatar {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.ufy-shirts-history-time {
  align-self: start;
  margin-top: 2px;
  color: #715d88;
  font-size:calc(10px * var(--ufy-font-scale,1));
  white-space: nowrap;
}

.ufy-shirts-history-privacy {
  display: block;
  margin-top: 5px;
  color: #766287;
  font-size:calc(11px * var(--ufy-font-scale,1));
}

.ufy-shirts-history-action,
.ufy-shirts-history-load-more {
  padding: 8px 12px;
  border: 1px solid rgba(134, 78, 211, 0.3);
  border-radius: 12px;

  color: #703ac5;
  background: rgba(var(--ufy-rgb-255,255,255,255),0.6);
  font: inherit;
  font-size:calc(12px * var(--ufy-font-scale,1));
  cursor: pointer;
}

.ufy-shirts-history-action {
  margin-top: 8px;
}

.ufy-shirts-history-load-more {
  display: block;
  margin: 14px auto 0;
}

.ufy-shirts-history-status {
  margin: 16px 0;
  color: #6a577e;
  font-size:calc(13px * var(--ufy-font-scale,1));
  line-height: 1.5;
  text-align: center;
}

.ufy-shirts-history-status.is-error {
  color: #9d3657;
}

.ufy-shirts-history-expand {
  flex: 0 0 auto;
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border: 0;

  color: #8545e8;
  background: rgba(237, 227, 253, 0.74);
  font: inherit;
  font-size:calc(12px * var(--ufy-font-scale,1));
  cursor: pointer;
}

.ufy-shirts-history-expand::before {
  content: "⌃";
  display: block;
  font-size:calc(22px * var(--ufy-font-scale,1));
  line-height: 16px;
}

.ufy-shirts-history-sheet.is-expanded
.ufy-shirts-history-expand::before {
  content: "⌄";
}

.ufy-shirts-history-layer button:focus-visible,
.ufy-shirts-history-layer a:focus-visible {
  outline: 2px solid #8247df;
  outline-offset: 3px;
}

.ufy-shirts-history-layer button:disabled {
  opacity: 0.6;
  cursor: default;
}

.ufy-shirts-history-layer [hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .ufy-shirts-history-sheet {
    transition: none;
  }
}