/* ==========================================================================
   123 STICKERS — HTML HEADER ACTIONS (Search / Account / Cart)
   Used by js/header-actions.js on index.html and custom_stickers_materials.html
   ========================================================================== */

html.st-scroll-locked {
  overflow: hidden;
}

.st-cart-badge[hidden],
.st-overlay-backdrop[hidden],
.st-search-panel[hidden],
.st-search-clear[hidden],
.st-profile-panel[hidden],
.st-cart-panel[hidden],
.st-cart-foot[hidden] {
  display: none !important;
}

/* Cart badge on the header icon */
.fig-icon-btn--cart {
  position: relative;
}

.st-cart-badge {
  position: absolute;
  right: -10px;
  bottom: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 10px;
  background-color: #ff0000;
  color: #ffffff;
  font-family: var(--font-inter);
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

/* Shared backdrop */
.st-overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.45);
}

.st-overlay-backdrop--clear {
  background-color: transparent;
}

.st-icon-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: none;
  color: #8a8a8a;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.st-icon-close:hover {
  background-color: #f2f2f2;
  color: #111110;
}

.st-icon-close--dark {
  color: #111110;
}

/* ==========================================================================
   Search
   ========================================================================== */
.st-search-panel {
  position: fixed;
  left: 50%;
  z-index: 1001;
  width: min(560px, calc(100vw - 32px));
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  padding: 8px 20px 20px;
  transform: translateX(-50%);
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  font-family: var(--font-inter);
}

.st-search-top {
  display: flex;
  justify-content: flex-end;
}

.st-search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 8px 0 14px;
  border: 1px solid #111110;
  border-radius: 12px;
  background-color: #ffffff;
}

.st-search-field-icon {
  display: inline-flex;
  color: #111110;
}

.st-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #111111;
  font-family: inherit;
  font-size: 16px;
}

.st-search-input::-webkit-search-cancel-button {
  display: none;
}

.st-search-clear {
  height: 32px;
  padding: 0 14px;
  border: none;
  border-radius: 20px;
  background-color: #111110;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.st-search-results {
  margin-top: 8px;
  overflow-y: auto;
}

.st-search-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 6px;
  border: none;
  border-radius: 10px;
  background: none;
  color: #111111;
  font-family: inherit;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s;
}

.st-search-row:hover,
.st-search-row:focus-visible {
  background-color: #f4f4f4;
  outline: none;
}

.st-search-thumb {
  flex-shrink: 0;
  width: 55px;
  height: 40px;
  overflow: hidden;
  border-radius: 10px;
  background-color: #eeeeee;
}

.st-search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.st-search-title {
  line-height: 1.3;
}

.st-search-message {
  padding: 14px 6px 4px;
  color: #444444;
  font-size: 16px;
  text-align: center;
}

/* ==========================================================================
   Account panel (phones)
   ========================================================================== */
.st-profile-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1001;
  width: 75vw;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  padding: 0 20px 24px;
  overflow-y: auto;
  background-color: #111110;
  color: #ffffff;
  font-family: var(--font-inter);
  animation: st-slide-in 0.25s ease-out;
}

.st-profile-panel.st-is-busy {
  opacity: 0.6;
  pointer-events: none;
}

@keyframes st-slide-in {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.st-profile-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 64px;
}

.st-profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #2a2a2a url("https://i.pinimg.com/550x/57/70/f0/5770f01a32c3c53e90ecda61483ccb08.jpg") center / cover no-repeat;
}

.st-profile-hello {
  margin-top: 20px;
  font-size: 24px;
  font-weight: 500;
}

.st-profile-links {
  display: flex;
  flex-direction: column;
  margin-top: 30px;
}

.st-profile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 0 30px;
  border: none;
  background: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.st-profile-link-label {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.st-profile-copyright {
  margin-top: auto;
  font-size: 14px;
  line-height: 1.4;
}

/* ==========================================================================
   Cart popup
   ========================================================================== */
.st-cart-panel {
  position: fixed;
  right: 4vw;
  z-index: 1001;
  width: min(640px, 92vw);
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  padding: 24px 30px 30px;
  border-radius: 20px 0 20px 20px;
  background-color: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  color: #111111;
  font-family: var(--font-inter);
}

.st-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.st-cart-title {
  font-size: 32px;
  font-weight: 700;
}

.st-cart-body {
  margin-top: 20px;
  overflow-y: auto;
}

.st-cart-empty {
  padding: 10px 0 20px;
  font-size: 20px;
}

.st-cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid #eeeeee;
}

.st-cart-item:first-child {
  padding-top: 0;
}

.st-cart-thumb {
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background-color: #f7f7f7;
  color: #555555;
}

.st-cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.st-cart-thumb--file small {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
}

.st-cart-item-info {
  flex: 1;
  min-width: 0;
}

.st-cart-item-name {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

.st-cart-item-meta {
  margin-top: 6px;
  color: #555555;
  font-size: 15px;
}

.st-cart-item-price {
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 600;
}

.st-cart-foot {
  padding-top: 20px;
}

.st-cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 22px;
  font-weight: 600;
}

.st-cart-checkout {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 20px;
  border: none;
  border-radius: 8px;
  background-color: #111110;
  color: #ffffff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s;
}

.st-cart-checkout:hover {
  background-color: var(--primary-red);
}

@media (max-width: 768px) {
  .st-cart-badge {
    right: -7px;
    bottom: -2px;
    min-width: 14px;
    height: 14px;
    font-size: 10px;
    line-height: 14px;
  }

  .st-cart-panel {
    top: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-height: none;
    padding: 20px 16px 24px;
    border-radius: 0;
  }

  .st-cart-title {
    font-size: 26px;
  }

  .st-cart-item {
    gap: 14px;
  }

  .st-cart-thumb {
    width: 64px;
    height: 64px;
  }

  .st-cart-item-name,
  .st-cart-item-price {
    font-size: 16px;
  }

  .st-cart-foot {
    margin-top: auto;
  }
}
