/* ============================================================
   GLX Countdown Clocks v1.3.3 | Graphic Lux
   - Solid rounded tiles behind each digit
   - Gradient text digits
   - Enfold-safe responsive layout
   ============================================================ */

.glx-countdown {
  /* global surface + typography */
  --bg: var(--glx-bg, #0a0a0a);
  --text: var(--glx-text, #ffffff);
  --btn-bg: var(--glx-btn-bg, #4190de);
  --btn-text: var(--glx-btn-text, #ffffff);

  --headline-size: var(--headline-size, 28px);
  --light-size: var(--light-size, 18px);
  --button-size: var(--button-size, 16px);

  /* tile + digit system */
  --glx-num-bg: var(--glx-num-bg-color, #ffffff);
  --glx-digit-top: var(--glx-digit-color-top, #ffffff);
  --glx-digit-bottom: var(--glx-digit-color-bottom, #ffd28a);
  --glx-digit-fallback: #111111;
  --glx-num-weight: 800;

  /* label controls */
  --glx-label-color: var(--glx-label-color-val, #ffffff);
  --glx-label-size: var(--glx-label-size-val, 10px);

  background: var(--bg) !important;
  color: var(--text) !important;
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  z-index: 2;
  font-family: inherit;
  transition: all .25s ease;
}

/* =============== Structure =============== */
.glx-countdown .glx-box {
  max-width: 700px;
  margin: 0 auto;
  padding: 14px 22px;
}
.glx-countdown .glx-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
  position: relative;
  min-height: 64px;
}

/* =============== Headings =============== */
#top .glx-countdown h3.glx-headline {
  font-size: var(--headline-size);
  font-weight: 800;
  margin: 0;
  line-height: 0; /* requested */
  color: var(--text);
}
.glx-countdown .glx-light-head {
  font-size: var(--light-size);
  font-weight: 400;
  opacity: .9;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.2;
}

/* =============== Timer Core =============== */
.glx-countdown .glx-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px,1.6vw,14px);
  flex-wrap: nowrap;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
  min-height: 58px;
  background: transparent !important;
}
.glx-countdown .glx-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

/* ===== Digit tile ===== */
.glx-countdown .glx-num {
  display: inline-block;
  padding: 8px 12px;
  text-align: center;
  min-width: 2.4ch;
  font-size: clamp(22px,2.6vw,32px);
  font-weight: var(--glx-num-weight) !important;
  line-height: 1.2;
  background: var(--glx-num-bg) !important;
  border-radius: 12px;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.08),
    0 1px 2px rgba(0,0,0,.15);
  transition: background .3s ease, transform .15s ease;
  position: relative;
}
.glx-countdown .glx-num:hover { transform: scale(1.05); }

/* ===== Digits (gradient text) ===== */
.glx-countdown .glx-num-text {
  display: inline-block;
  font-weight: var(--glx-num-weight) !important;
  line-height: 1.2;
  background-image: linear-gradient(to bottom, var(--glx-digit-top), var(--glx-digit-bottom));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  color: var(--glx-digit-fallback);
}

/* ===== Labels under digits ===== */
.glx-countdown .glx-label {
  font-size: var(--glx-label-size);
  font-weight: 700;
  letter-spacing: .6px;
  opacity: .9;
  margin-top: 2px;
  text-transform: uppercase;
  color: var(--glx-label-color) !important;
}

/* ===== Separators (:) ===== */
.glx-countdown .glx-sep {
  font-weight: 700;
  opacity: .9;
  font-size: clamp(20px,2vw,24px);
  color: var(--text);
}

/* =============== Right-side Button =============== */
.glx-countdown .glx-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--btn-bg) !important;
  color: var(--btn-text) !important;
  font-size: var(--button-size);
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .1s ease, opacity .25s ease;
}
.glx-countdown .glx-btn:hover {
  transform: translateY(-1px);
  opacity: .9;
}

/* =============== Close (Dismiss) Button =============== */
.glx-countdown .glx-close {
  position: absolute;
  top: 6px;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  opacity: .8;
  cursor: pointer;
   z-index: 9999;            /* <- critical */
   pointer-events: auto;     /* <- makes sure it's clickable */
}
.glx-countdown .glx-close:hover { opacity: 1; }

/* =========================
   Responsive & Theme Guards
   ========================= */

.glx-countdown .glx-left,
.glx-countdown .glx-right {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.glx-left { margin-top: 10px; }

.glx-countdown,
.glx-countdown .glx-wrap,
.glx-countdown .glx-timer {
  will-change: contents;
  contain: layout style paint;
}

/* ====== Desktop (<=1200px) ====== */
@media (max-width: 1200px) {
  .glx-countdown .glx-box { padding: 14px 20px; }
  .glx-countdown .glx-wrap { gap: 20px; }
  .glx-countdown .glx-unit { min-width: 30px; }
}

/* ====== Tablet landscape (<=1024px) ====== */
@media (max-width: 1024px) {
  .glx-countdown .glx-wrap { gap: 16px; }
  .glx-countdown .glx-left { flex: 1 1 40%; }
  .glx-countdown .glx-right { flex: 1 1 40%; align-items: flex-end; }
}

/* ====== Mobile/Tablet layout for everything <=900px (one-line style) ====== */
@media (max-width: 900px) {

  .glx-countdown .glx-box {
    max-width: 100%;
    padding: 14px 22px; /* keep consistent gutter left/right */
  }

  .glx-countdown .glx-wrap {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 10px; /* was 12px, slightly tighter to free room for bigger tiles */
    text-align: left;
    min-height: 68px; /* tiny bump so nothing feels vertically pinched */
  }

  /* lock clusters so timer can breathe */
  .glx-countdown .glx-left,
  .glx-countdown .glx-right,
  .glx-countdown .glx-timer {
    flex: 0 0 auto;
  }

  .glx-countdown .glx-left {
    margin-left: 0;
    text-align: left;
  }

  .glx-countdown .glx-right {
    margin-right: 0;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    text-align: right;
  }

  /***** LEFT TEXT (BEST DEALS...) *****/
  #top .glx-countdown h3.glx-headline {
    font-size: clamp(1rem, 2.4vw, 1.4rem);
    line-height: 0;
    font-weight: 800;
  }

  .glx-countdown .glx-light-head {
    font-size: clamp(0.8rem, 1.8vw, 1rem);
    line-height: 1.2;
    margin-top: 2px;
    font-weight: 400;
  }

  /***** TIMER BLOCK *****/
  .glx-countdown .glx-timer {
    gap: 6px; /* keep it tight between tiles */
  }

  .glx-countdown .glx-unit {
    min-width: 48px; /* was 60px desktop. Smaller min lets us grow font without forcing wrap */
  }

  .glx-countdown .glx-num {
    /* make the tiles feel bigger and chunkier */
    font-size: clamp(1.2rem, 3vw, 1.8rem); /* was clamp(1rem,2.8vw,1.6rem) */
    padding: 8px 12px;                     /* was 6px 10px */
    border-radius: 10px;                   /* was 8px */
    min-width: 2.6ch;                      /* tiny bump so 2-digit numbers don't feel squished */
    line-height: 1.15;
  }

  .glx-countdown .glx-label {
    /* slightly bigger and a hair more line-height for readability under the chunkier digits */
    font-size: clamp(0.6rem, 1.2vw, 0.75rem); /* was clamp(0.55rem,1vw,0.7rem) */
    line-height: 1.15;
    letter-spacing: 0.4px;
    font-weight: 700;
  }

  /* separators ":" are hidden globally anyway, you already set display:none; just leaving alone */

  /***** CTA BUTTON (SHOP NOW) *****/
  .glx-countdown .glx-btn {
    text-transform: uppercase;
    font-size: clamp(0.8rem, 1.6vw, 1rem);
    font-weight: 700;
    line-height: 1.2;
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--btn-bg) !important;
    color: var(--btn-text) !important;
    white-space: nowrap;
  }

  /* Keep the close aligned to the right of SHOP NOW */
  .glx-countdown .glx-close {
    position: absolute;       /* inline with button cluster */
    font-size: 18px;
    line-height: 1;
    padding: 0 0 0 4px;
    opacity: .8;
  }
  .glx-countdown .glx-close:hover { opacity: 1; }
}

@media (max-width: 480px) {
    .glx-countdown .glx-btn {
        padding: 8px 3px;
    }
}
@media (max-width: 430px) {
  /* still NO wrapping above 400px */
  .glx-countdown .glx-wrap {
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start; /* top-align so tiles don't get forced short */
    gap: 8px; /* tight between left / timer / right */
    min-height: 72px; /* gives the bar a little vertical presence */
  }

  /* LEFT TEXT */
      #top .glx-countdown h3.glx-headline {
        font-size: clamp(0.9rem, 2vw, 1.05rem);
        line-height: 0;
        font-weight: 800;
        margin-top: 13px;
    }

  .glx-countdown .glx-light-head {
    font-size: clamp(0.65rem, 1.5vw, 0.8rem);
    line-height: 1.2;
    margin-top: 2px;
  }

  .glx-countdown .glx-left {
    flex: 0 1 auto;
    max-width: 30%;      /* was 28%, tiny bump so text can wrap naturally to 2 lines */
    text-align: left;
  }

  /* TIMER */
  .glx-countdown .glx-timer {
    flex: 0 0 auto;
    gap: 4px; /* was 4px; make tiles breathe a hair */
  }

  .glx-countdown .glx-unit {
    min-width: 35px; /* keep each block consistent vertically */
    text-align: center;
  }

  .glx-countdown .glx-num {
    font-size: clamp(1.2rem, 3vw, 1.8rem); /* same "chunky" size from <=900px */
    padding: 5px 5px;                     /* same as <=900px */
    border-radius: 10px;                   /* same as <=900px */
    min-width: 2.6ch;
    line-height: 1.15;
  }

  .glx-countdown .glx-label {
    font-size: clamp(0.4rem, 1.2vw, 0.75rem); /* bigger than before */
    line-height: 1.15;
    letter-spacing: 0.4px;
    font-weight: 400;
  }

  /* CTA + CLOSE */
  .glx-countdown .glx-right {
    flex: 0 1 auto;
    max-width: 30%;          /* was 28%; match left for symmetry */
    display: flex;
    flex-direction: row;
    align-items: flex-start; /* align to top so button sits level with tiles */
    gap: 6px;
    text-align: right;
        margin-top: 13px;
  }

  .glx-countdown .glx-btn {
    text-transform: uppercase;
    font-size: 0.75rem;      /* a touch up from 0.7rem so it keeps presence vs bigger tiles */
    font-weight: 700;
    line-height: 1.2;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
  }

  .glx-countdown .glx-close:hover { opacity: 1; }
}



/* ====== Under 400px: finally allow 2-line layout ====== */
@media (max-width: 400px) {
  .glx-countdown .glx-box {
    padding: 14px 16px; /* optional: slight side squeeze for the absolute tiniest phones */
  }

  .glx-countdown .glx-wrap {
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    text-align: center;
    row-gap: 8px;
    column-gap: 8px;
  }

  .glx-countdown .glx-left {
    flex: 0 0 100%;
    max-width: 100%;
    order: 1;
    align-items: flex-start;
    text-align: left;
  }

  /* restore slightly larger headline since it's on its own row now */
  #top .glx-countdown h3.glx-headline {
    font-size: clamp(1rem, 2.4vw, 1.3rem);
    line-height: 0;
    font-weight: 800;
  }

  .glx-countdown .glx-light-head {
    font-size: clamp(0.8rem, 1.8vw, 1rem);
    line-height: 1.2;
    margin-top: 2px;
  }

  .glx-countdown .glx-timer {
    flex: 0 0 auto;
    order: 2;
    gap: 6px;
  }

  .glx-countdown .glx-right {
    flex: 0 0 auto;
    order: 3;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    text-align: center;
  }

  .glx-countdown .glx-btn {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 8px 14px;
    border-radius: 10px;
    white-space: nowrap;
  }

  .glx-countdown .glx-close {
    position: static;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    opacity: .8;
  }
  .glx-countdown .glx-close:hover { opacity: 1; }
}



/* =========================
   Enfold / Theme Overrides
   ========================= */

.glx-countdown { background: var(--bg) !important; color: var(--text) !important; }
.glx-countdown .glx-btn { background: var(--btn-bg) !important; color: var(--btn-text) !important; }
.glx-countdown .glx-timer { background: transparent !important; }

.glx-countdown a.glx-btn,
.glx-countdown a.glx-btn:link,
.glx-countdown a.glx-btn:visited,
.glx-countdown a.glx-btn:hover,
.glx-countdown a.glx-btn:active {
  color: var(--btn-text) !important;
  text-decoration: none !important;
  outline: 0;
}

.glx-countdown .glx-btn[class*="button"],
.glx-countdown .glx-btn[class*="btn"] {
  background: var(--btn-bg) !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Ensure separators & labels aren't recolored by themes */
.glx-countdown .glx-sep { color: var(--text) !important; display: none; }
.glx-countdown .glx-label { color: var(--glx-label-color) !important; }

/* Remove Enfold spacing issues */
.avia-section .glx-countdown,
.avia-content-slider .glx-countdown {
  margin: 0 !important;
  padding-inline: 0 !important;
}

/* Prevent header gap when sticky */
.header-is-scrolled #header {
  top: 0 !important;
  margin-top: 0 !important;
  transform: translateY(0) !important;
}

/* =========================
   Utilities / Variants
   ========================= */

.glx-countdown.is-compact .glx-num {
  font-size: clamp(18px, 2.2vw, 24px);
  padding: 6px 10px;
}
.glx-countdown.is-compact .glx-btn { padding: 8px 14px; }
.glx-countdown.alignwide .glx-box { max-width: 1440px; }
.glx-countdown.alignfull .glx-box { max-width: none; }

.glx-countdown.is-contrast .glx-label,
.glx-countdown.is-contrast .glx-sep { opacity: 1; }

.glx-countdown::before {
  content: "";
  display: block;
  height: 0;
  margin-top: -0.01px;
}
