/* === Base Layout === */
.wpcd-banner,
.wpcd-block {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-align: center;
  font-family: sans-serif;
  font-size: 16px;
}

/* === Non-sticky Banner (no JS needed) === */
.wpcd-banner {
  position: sticky;
  top:0;
  width: 100%;
  background: #222;
  padding: 12px 0;
  z-index: 9999;
}

/* === Inline Block === */
.wpcd-block {
  position: relative;
  background: #222;
  padding: 10px 15px;
  border-radius: 6px;
}

/* Offset banner when admin bar is visible */
.admin-bar .wpcd-banner {
  top: 32px; /* Default admin bar height */
}

@media screen and (max-width: 782px) {
  .admin-bar .wpcd-banner {
    top: 46px; /* Taller admin bar on mobile */
  }
}

/* === Shared Elements === */
.wpcd-message {
  font-weight: 600;
  margin-right: 4px;
}

.wpcd-btn {
  display: inline-block;
  margin-left: 10px;
  padding: 6px 14px;
  background: #ffcc00;
  color: #000;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}
.wpcd-btn:hover {
  background: #ffdb4d;
}

.no-js {
  opacity: 0.8;
  font-style: italic;
}

/* === Countdown Timer === */
.wpcd-timer {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: nowrap;
  line-height: 1.2;
}

/* === Timer Units === */
.wpcd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 60px;
  text-align: center;
  box-sizing: border-box;
}

/* Number box */
.wpcd-value {
  background: #fff;
  color: #e60000;
  font-weight: bold;
  padding: 6px 10px;
  border-radius: 4px;
  min-width: 40px;
  text-align: center;
}

/* Label text */
.wpcd-label {
  font-size: 13px;
  color: #fff;
  margin-top: 6px;
}

/* === Label Positions === */
.wpcd-label-above,
.wpcd-label-below {
  flex-direction: column;
}

.wpcd-label-above .wpcd-label {
  order: -1;
  margin-bottom: 2px;
}
.wpcd-label-below .wpcd-label {
  margin-top: 2px;
}

.wpcd-label-left {
  flex-direction: row-reverse;
}
.wpcd-label-right {
  flex-direction: row;
}

.wpcd-label-left .wpcd-label {
  margin-right: 4px;
}
.wpcd-label-right .wpcd-label {
  margin-left: 4px;
}

/* === Responsive === */
@media (max-width: 480px) {
  .wpcd-timer {
    flex-wrap: wrap;
  }
  .wpcd-unit {
    flex: 1 1 45%;
  }
}
