/*
 * KLYQ v12.3 — account, verification, shopping-cart and gift-builder refinements.
 */

/* Keep WooCommerce empty-state notices readable even when their link is first in the markup. */
body .klyq-account-endpoint-orders .woocommerce-MyAccount-content .woocommerce-info,
body .klyq-account-endpoint-downloads .woocommerce-MyAccount-content .woocommerce-info{
  display:block!important;position:relative!important;min-height:92px!important;padding:25px 170px 25px 68px!important;line-height:1.55!important;
}
body .klyq-account-endpoint-orders .woocommerce-MyAccount-content .woocommerce-info::after,
body .klyq-account-endpoint-downloads .woocommerce-MyAccount-content .woocommerce-info::after{content:"";display:block;clear:both}
body .klyq-account-endpoint-orders .woocommerce-MyAccount-content .woocommerce-info .button,
body .klyq-account-endpoint-downloads .woocommerce-MyAccount-content .woocommerce-info .button{
  float:right!important;margin:0 -150px 0 18px!important;min-width:132px!important;transition:transform .18s ease,background-color .18s ease,color .18s ease,border-color .18s ease!important;
}
body .klyq-account-endpoint-orders .woocommerce-MyAccount-content .woocommerce-info .button:hover,
body .klyq-account-endpoint-orders .woocommerce-MyAccount-content .woocommerce-info .button:focus-visible,
body .klyq-account-endpoint-downloads .woocommerce-MyAccount-content .woocommerce-info .button:hover,
body .klyq-account-endpoint-downloads .woocommerce-MyAccount-content .woocommerce-info .button:focus-visible{
  transform:translateY(-2px)!important;border-color:var(--klyq-lime)!important;background:var(--klyq-lime)!important;color:#050607!important;
}

/* Force the address cards into equal parallel columns instead of retaining WooCommerce floats. */
body .klyq-account-endpoint-edit-address .woocommerce-Addresses,
body .klyq-account-endpoint-edit-address .u-columns.col2-set{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:stretch!important;gap:18px!important;
}
body .klyq-account-endpoint-edit-address .woocommerce-Addresses>.woocommerce-Address,
body .klyq-account-endpoint-edit-address .u-columns.col2-set>.u-column1,
body .klyq-account-endpoint-edit-address .u-columns.col2-set>.u-column2{
  width:auto!important;float:none!important;clear:none!important;min-width:0!important;height:100%!important;
}
body .klyq-account-endpoint-edit-address .woocommerce-Address{min-height:252px!important}
body .klyq-account-endpoint-edit-address .woocommerce-Address header{margin:0 0 18px!important}

/* Account profile layout: two deliberate columns with equal inputs and no legacy float gaps. */
body .klyq-account-endpoint-edit-account .woocommerce-EditAccountForm{grid-template-columns:repeat(2,minmax(0,1fr))!important;column-gap:16px!important;row-gap:12px!important}
body .klyq-account-endpoint-edit-account .woocommerce-EditAccountForm .form-row-first,
body .klyq-account-endpoint-edit-account .woocommerce-EditAccountForm .form-row-last{
  width:auto!important;float:none!important;margin:0!important;min-width:0!important;
}
body .klyq-account-endpoint-edit-account .woocommerce-EditAccountForm .form-row-wide{margin:0!important}
body .klyq-security-panel summary strong{transition:transform .18s ease,background-color .18s ease,color .18s ease,border-color .18s ease!important}
body .klyq-security-panel summary:hover strong,
body .klyq-security-panel summary:focus-visible strong{
  transform:translateY(-1px);border-color:var(--klyq-lime)!important;background:var(--klyq-lime)!important;color:#050607!important;
}

/* The human check is a compact launcher; its full two-stage flow only appears in a modal. */
.klyq-human-check-launcher{
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:13px!important;padding:13px 14px!important;
}
.klyq-human-check-launcher .klyq-human-brand{min-width:0}
.klyq-human-open{
  flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 13px;border:1px solid #11141a;border-radius:7px;background:#11141a;color:#fff;font-size:9px;font-weight:950;letter-spacing:.01em;cursor:pointer;transition:transform .18s ease,background-color .18s ease,color .18s ease,border-color .18s ease;
}
.klyq-human-open:hover,.klyq-human-open:focus-visible{transform:translateY(-1px);border-color:var(--klyq-lime);background:var(--klyq-lime);color:#050607}
.klyq-human-check.verified .klyq-human-open{border-color:#16864b;background:#16864b;color:#fff}
.klyq-human-check.verified .klyq-human-open::before{content:"✓ ";font-size:11px}
.klyq-human-dialog[hidden]{display:none!important}
.klyq-human-dialog{
  position:fixed!important;inset:0!important;z-index:210500!important;display:grid!important;place-items:center!important;padding:20px!important;background:rgba(5,7,10,.42)!important;
}
.klyq-human-dialog-card{
  position:relative;width:min(480px,100%);max-height:min(700px,calc(100vh - 40px));overflow:auto;padding:24px;border:1px solid #dce3eb;border-radius:16px;background:#fff;box-shadow:0 28px 80px rgba(0,0,0,.3);
}
.klyq-human-dialog-close{position:absolute;top:10px;right:12px;width:32px;height:32px;border:0;border-radius:50%;background:#f1f4f7;color:#11141a;font-size:22px;line-height:1;cursor:pointer}
.klyq-human-dialog-close:hover{background:#11141a;color:var(--klyq-lime)}
.klyq-human-dialog-head{display:flex;align-items:center;gap:12px;padding-right:28px}
.klyq-human-dialog-head img{width:92px;height:auto}
.klyq-human-dialog-head b,.klyq-human-dialog-head small{display:block}
.klyq-human-dialog-head b{font-size:14px}
.klyq-human-dialog-head small,.klyq-human-dialog-status{color:#6d7885;font-size:10px;line-height:1.45}
.klyq-human-dialog-status{display:block;margin-top:11px;text-align:center;font-weight:800}
.klyq-human-dialog .klyq-turnstile-mount{min-height:70px}

/* A logged-out account is one focused task at a time; the header modal remains the quick-access route. */
.woocommerce-account:not(.logged-in) .klyq-account-page>.woocommerce{display:block!important}
.woocommerce-account:not(.logged-in) #customer_login{display:block!important;max-width:590px!important;margin:0 auto!important}
.woocommerce-account:not(.logged-in) #customer_login>.u-column1,
.woocommerce-account:not(.logged-in) #customer_login>.u-column2{float:none!important;width:100%!important;margin:0!important}
.woocommerce-account:not(.logged-in) #customer_login>.u-column2{display:none!important}
body.klyq-account-register #customer_login>.u-column1{display:none!important}
body.klyq-account-register #customer_login>.u-column2{display:block!important}
.klyq-account-entry-switch{max-width:590px;margin:0 auto 18px;padding:24px;border:1px solid #dce3eb;border-radius:14px;background:linear-gradient(135deg,#fff,#f7f9fb)}
.klyq-account-entry-switch h2{margin:7px 0!important;font-size:27px!important}
.klyq-account-entry-switch p{margin:0 0 16px;color:#687481;font-size:12px;line-height:1.5}
.klyq-account-entry-switch>div{display:flex;gap:8px}
.klyq-account-entry-switch a{display:inline-flex;align-items:center;justify-content:center;min-height:39px;padding:0 13px;border:1px solid #d8e0e8;border-radius:7px;color:#11141a;font-size:9px;font-weight:950}
.klyq-account-entry-switch a:hover,.klyq-account-entry-switch a.active{border-color:#11141a;background:#11141a;color:var(--klyq-lime)}

/* Compact the KLYQs hub without losing the balance / reward hierarchy. */
.klyq-account-page .klyq-reward-account.old{gap:13px!important}
.klyq-account-page .klyq-reward-account-head{padding:17px 20px!important}
.klyq-account-page .klyq-reward-account-head h2{font-size:23px!important}
.klyq-account-page .klyq-reward-account-head>i{width:42px!important;height:42px!important;font-size:18px!important}
.klyq-account-page .klyq-reward-core{gap:13px!important}
.klyq-account-page .klyq-reward-core .klyq-reward-balance-hero,
.klyq-account-page .klyq-reward-core .klyq-reward-create{min-height:208px!important;padding:21px!important}
.klyq-account-page .klyq-reward-balance-hero h2{margin:4px 0!important;font-size:30px!important}
.klyq-account-page .klyq-reward-create h3{margin:5px 0 8px!important;font-size:18px!important}
.klyq-account-page .klyq-reward-create p{margin:0!important;font-size:11px!important;line-height:1.45}
.klyq-account-page .klyq-reward-create .klyq-muted{margin-top:12px!important}
.klyq-account-page .klyq-reward-vouchers{padding:17px 20px!important}

/* Product purchase paths: Buy Now goes to the shopping cart; Express Checkout remains intentionally explicit. */
.klyq-buy-box form.cart>.klyq-express-checkout,
.klyq-buy-box .woocommerce-variation-add-to-cart .klyq-express-checkout{
  grid-column:1/-1;min-height:46px!important;margin:0!important;border:1px solid #11141a!important;border-radius:7px!important;background:#11141a!important;color:#fff!important;font-size:10px!important;font-weight:950!important;
}
.klyq-buy-box form.cart>.klyq-express-checkout:hover,
.klyq-buy-box .woocommerce-variation-add-to-cart .klyq-express-checkout:hover{border-color:var(--klyq-lime)!important;background:var(--klyq-lime)!important;color:#050607!important}

/* Perks-and-gifts labels now use the same intentional inversion as other KLYQ buttons. */
.klyq-old-promo-grid>a b{transition:transform .18s ease,background-color .18s ease,color .18s ease,border-color .18s ease}
.klyq-old-promo-grid>a:hover b,.klyq-old-promo-grid>a:focus-visible b{transform:translateY(-1px);background:#11141a;color:var(--klyq-lime)}
.klyq-old-promo-grid>a.white:hover b,.klyq-old-promo-grid>a.white:focus-visible b{background:#11141a;color:var(--klyq-lime)}

/* Gift Builder and the post-build preview. */
.klyq-gift-builder{padding-top:20px!important}
.klyq-gift-builder-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,.42fr);gap:20px;align-items:stretch;margin-bottom:18px}
.klyq-gift-builder-head>div,.klyq-gift-builder-head>aside{padding:24px;border:1px solid #dce3eb;border-radius:14px;background:#fff}
.klyq-gift-builder-head h2{margin:7px 0!important;font-size:30px!important}
.klyq-gift-builder-head p{margin:0;color:#687481;line-height:1.55}
.klyq-gift-builder-head>aside{display:grid;grid-template-columns:46px minmax(0,1fr);gap:5px 12px;align-content:center;background:linear-gradient(145deg,#11172c,#29306c);color:#fff}
.klyq-gift-box-mark{grid-row:1/4;display:grid;place-items:center;width:46px;height:46px;border-radius:12px;background:var(--klyq-lime);color:#050607;font-size:25px;font-weight:950}
.klyq-gift-builder-head>aside b{font-size:15px}
.klyq-gift-builder-head>aside small{color:#d1d8e9;font-size:10px}
.klyq-gift-builder-head>aside .klyq-btn{grid-column:1/-1;margin-top:12px}
.klyq-gift-builder-head>aside .klyq-btn:disabled{opacity:.52;cursor:not-allowed;filter:grayscale(.3)}
.klyq-gift-picker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.klyq-gift-picker-card{display:grid;grid-template-rows:145px auto auto;gap:10px;padding:10px;border:1px solid #dce3eb;border-radius:12px;background:#fff;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.klyq-gift-picker-card:hover,.klyq-gift-picker-card.is-selected{border-color:#a8cf35;box-shadow:0 10px 24px rgba(26,43,81,.09);transform:translateY(-2px)}
.klyq-gift-picker-card.is-selected{background:#fbfff0}
.klyq-gift-picker-card img{width:100%;height:145px;border-radius:8px;background:#f4f6f8;object-fit:contain}
.klyq-gift-picker-card small{display:block;min-height:14px;overflow:hidden;color:#697481;font-size:8px;white-space:nowrap;text-overflow:ellipsis}
.klyq-gift-picker-card h3{min-height:40px;margin:3px 0!important;font-size:13px!important;line-height:1.3!important}
.klyq-gift-picker-card strong{font-size:12px}
.klyq-gift-picker-card button{min-height:38px;border:1px solid #11141a;border-radius:7px;background:#fff;color:#11141a;font-size:8px;font-weight:950;cursor:pointer}
.klyq-gift-picker-card button:hover,.klyq-gift-picker-card.is-selected button{border-color:#11141a;background:#11141a;color:var(--klyq-lime)}
.klyq-gift-preview[hidden]{display:none!important}
.klyq-gift-preview{position:fixed;inset:0;z-index:210200;display:grid;place-items:center;padding:20px;background:rgba(4,7,12,.52)}
.klyq-gift-preview>div{position:relative;width:min(570px,100%);max-height:calc(100vh - 40px);overflow:auto;padding:30px;border-radius:18px;background:linear-gradient(145deg,#11172b,#262d69);color:#fff;box-shadow:0 32px 90px rgba(0,0,0,.36);transform:scale(.9);opacity:0}
.klyq-gift-preview.open>div{animation:klyqGiftReveal .5s cubic-bezier(.2,.8,.2,1) forwards}
@keyframes klyqGiftReveal{0%{transform:scale(.74) translateY(24px);opacity:0}70%{transform:scale(1.025) translateY(-3px);opacity:1}100%{transform:scale(1);opacity:1}}
.klyq-gift-preview-close{position:absolute;top:12px;right:13px;width:34px;height:34px;border:0;border-radius:50%;background:rgba(255,255,255,.13);color:#fff;font-size:23px;cursor:pointer}
.klyq-gift-preview-close:hover{background:var(--klyq-lime);color:#050607}
.klyq-gift-preview h2{margin:8px 0!important;color:#fff;font-size:34px!important}
.klyq-gift-preview>div>p{max-width:500px;margin:0;color:#d3d9e7;line-height:1.55}
.klyq-gift-preview-box{display:grid;grid-template-columns:92px minmax(0,1fr);gap:14px;align-items:center;margin:20px 0;padding:16px;border:1px solid rgba(213,248,40,.45);border-radius:13px;background:rgba(1,4,9,.32)}
.klyq-gift-preview-box>i{display:grid;place-items:center;width:84px;height:84px;border-radius:14px;background:var(--klyq-lime);color:#050607;font-size:47px;font-style:normal;font-weight:950;box-shadow:inset -12px -12px 0 rgba(0,0,0,.08)}
.klyq-gift-preview-box>div{display:grid;gap:7px}
.klyq-gift-preview-box article{display:flex;align-items:center;gap:9px;font-size:11px;font-weight:800}
.klyq-gift-preview-box article img{width:32px;height:32px;border-radius:6px;background:#fff;object-fit:contain}
.klyq-gift-preview-actions{display:flex;flex-wrap:wrap;gap:9px}
.klyq-gift-preview-actions .klyq-btn{min-height:44px}

/* One Gift Box parent row with its editable contents shown as a compact tree. */
.klyq-gift-box-title{display:flex;gap:9px;align-items:center}
.klyq-gift-box-title>i{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:#111827;font-style:normal}
.klyq-gift-box-title b,.klyq-gift-box-title small{display:block}
.klyq-gift-box-title small{margin-top:2px;color:#697481;font-size:9px;font-weight:500}
.klyq-gift-quantity{display:inline-flex;align-items:center;min-height:30px;padding:0 9px;border-radius:99px;background:#f2f5e8;color:#4d6910;font-size:9px;font-weight:900}
.klyq-gift-cart-tree{margin-top:10px;padding:10px 12px;border:1px solid #dce3eb;border-radius:10px;background:#f8fafc}
.klyq-gift-cart-tree summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;color:#27313e;font-size:10px;font-weight:900}
.klyq-gift-cart-tree summary::-webkit-details-marker{display:none}
.klyq-gift-cart-tree summary span{display:flex;align-items:center;gap:7px}
.klyq-gift-cart-tree summary i{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#11141a;color:var(--klyq-lime);font-style:normal}
.klyq-gift-cart-tree summary b{color:#697481;font-size:8px}
.klyq-gift-cart-tree ul{display:grid;gap:7px;margin:10px 0 0;padding:0;list-style:none}
.klyq-gift-cart-tree li{display:grid;grid-template-columns:31px minmax(0,1fr) auto;gap:8px;align-items:center}
.klyq-gift-cart-tree li img{width:31px;height:31px;border-radius:5px;background:#fff;object-fit:contain}
.klyq-gift-cart-tree li a{display:block;color:#151b25;font-size:10px;font-weight:800}
.klyq-gift-cart-tree li small{display:block;margin-top:1px;color:#697481;font-size:8px}
.klyq-gift-cart-tree li button{padding:0;border:0;background:none;color:#a5323a;font-size:8px;font-weight:950;cursor:pointer}
.klyq-drawer-gift-note{color:#687481;font-size:9px;line-height:1.35}
.klyq-drawer-gift .klyq-remove-item{margin-top:7px}

@media(max-width:782px){
  body .klyq-account-endpoint-orders .woocommerce-MyAccount-content .woocommerce-info,
  body .klyq-account-endpoint-downloads .woocommerce-MyAccount-content .woocommerce-info{padding:58px 16px 16px!important;text-align:center!important}
  body .klyq-account-endpoint-orders .woocommerce-MyAccount-content .woocommerce-info .button,
  body .klyq-account-endpoint-downloads .woocommerce-MyAccount-content .woocommerce-info .button{float:none!important;margin:12px auto 0!important}
  body .klyq-account-endpoint-edit-address .woocommerce-Addresses,
  body .klyq-account-endpoint-edit-address .u-columns.col2-set{grid-template-columns:1fr!important}
  body .klyq-account-endpoint-edit-account .woocommerce-EditAccountForm{grid-template-columns:1fr!important}
  .klyq-human-check-launcher{align-items:flex-start!important;flex-direction:column!important}
  .klyq-human-open{width:100%}
  .klyq-gift-builder-head{grid-template-columns:1fr}
  .klyq-gift-picker-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:560px){
  .klyq-account-entry-switch{padding:18px}
  .klyq-account-entry-switch>div{display:grid;grid-template-columns:1fr 1fr}
  .klyq-human-dialog{padding:12px!important}
  .klyq-human-dialog-card{padding:20px 15px}
  .klyq-gift-picker-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .klyq-gift-picker-card{grid-template-rows:120px auto auto;padding:8px}
  .klyq-gift-picker-card img{height:120px}
  .klyq-gift-picker-card h3{font-size:12px!important}
  .klyq-gift-preview>div{padding:25px 18px}
  .klyq-gift-preview h2{font-size:28px!important}
  .klyq-gift-preview-box{grid-template-columns:1fr}
  .klyq-gift-preview-box>i{width:58px;height:58px;font-size:30px}
  .klyq-gift-preview-actions{display:grid;grid-template-columns:1fr}
  .klyq-gift-preview-actions .klyq-btn{justify-content:center}
}
@media(prefers-reduced-motion:reduce){
  .klyq-human-open,.klyq-gift-picker-card,.klyq-old-promo-grid>a b{transition:none!important}
  .klyq-gift-preview.open>div{animation:none!important;opacity:1;transform:none}
}
