/* ==========================================================================
   Premium Countdown Shortcode - Ex-Ante Style
   Design: Ultra-Compact, Crisp White & Delicate Logo Blue Accent (#28639F)
   ========================================================================== */

.pcd-countdown {
  --pcd-accent: #28639F;
  --pcd-accent-glow: rgba(40, 99, 159, 0.16);
  --pcd-accent-subtle: rgba(40, 99, 159, 0.04);
  --pcd-accent-border: rgba(40, 99, 159, 0.25);
  
  --pcd-bg: #ffffff;
  --pcd-bg-card: #ffffff;
  --pcd-bg-unit: rgba(40, 99, 159, 0.04);
  --pcd-border: rgba(40, 99, 159, 0.18);
  --pcd-text: #0f172a;
  --pcd-muted: #64748b;
  --pcd-shadow: 0 4px 20px -2px rgba(40, 99, 159, 0.08), 0 2px 6px rgba(0, 0, 0, 0.03);

  box-sizing: border-box;
  color: var(--pcd-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  margin: 12px 0;
  width: 100%;
}

.pcd-countdown *,
.pcd-countdown *::before,
.pcd-countdown *::after {
  box-sizing: border-box;
}

/* Base Shell (White & Crisp) */
.pcd-shell {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--pcd-border);
  border-radius: 10px;
  box-shadow: var(--pcd-shadow);
  overflow: hidden;
  padding: 10px 14px;
  position: relative;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Top Accent Line */
.pcd-shell::before {
  background: linear-gradient(90deg, transparent 0%, var(--pcd-accent) 50%, transparent 100%);
  content: "";
  height: 2px;
  left: 0;
  opacity: 0.9;
  position: absolute;
  top: 0;
  width: 100%;
}

.pcd-countdown:hover .pcd-shell {
  border-color: var(--pcd-accent-border);
  box-shadow: 0 6px 24px -4px rgba(40, 99, 159, 0.15), 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Close Button [✕] */
.pcd-close-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--pcd-muted);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.2s ease, background-color 0.2s ease;
  z-index: 2;
}

.pcd-close-btn:hover {
  color: var(--pcd-accent);
  background-color: var(--pcd-accent-subtle);
}

/* Theme: Light (White - Default) */
.pcd-theme-light {
  --pcd-bg: #ffffff;
  --pcd-bg-card: #ffffff;
  --pcd-bg-unit: rgba(40, 99, 159, 0.04);
  --pcd-border: rgba(40, 99, 159, 0.18);
  --pcd-text: #0f172a;
  --pcd-muted: #64748b;
  --pcd-shadow: 0 4px 18px -2px rgba(40, 99, 159, 0.08);
}

/* Theme: Dark (Obsidian) */
.pcd-theme-dark {
  --pcd-bg: #0b0f17;
  --pcd-bg-card: rgba(15, 22, 33, 0.95);
  --pcd-bg-unit: rgba(40, 99, 159, 0.12);
  --pcd-border: rgba(40, 99, 159, 0.25);
  --pcd-text: #f1f5f9;
  --pcd-muted: #94a3b8;
  --pcd-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.4);
}

.pcd-theme-dark .pcd-shell {
  background: var(--pcd-bg-card);
}

/* Theme: Glass (Clean White Glass) */
.pcd-theme-glass {
  --pcd-bg: rgba(255, 255, 255, 0.85);
  --pcd-bg-card: rgba(255, 255, 255, 0.82);
  --pcd-bg-unit: rgba(40, 99, 159, 0.05);
  --pcd-border: rgba(40, 99, 159, 0.2);
}

.pcd-theme-glass .pcd-shell {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Alignment Rules */
.pcd-align-left { text-align: left; }
.pcd-align-center { text-align: center; }
.pcd-align-right { text-align: right; }

.pcd-align-left .pcd-header { text-align: left; }
.pcd-align-center .pcd-header { text-align: center; }
.pcd-align-right .pcd-header { text-align: right; }

.pcd-align-left .pcd-kicker { justify-content: flex-start; }
.pcd-align-center .pcd-kicker { justify-content: center; }
.pcd-align-right .pcd-kicker { justify-content: flex-end; }

.pcd-timer-wrap {
  display: flex;
  width: 100%;
}

.pcd-align-left .pcd-timer-wrap { justify-content: flex-start; }
.pcd-align-center .pcd-timer-wrap { justify-content: center; }
.pcd-align-right .pcd-timer-wrap { justify-content: flex-end; }

.pcd-grid {
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.pcd-align-left .pcd-grid { justify-content: flex-start; }
.pcd-align-center .pcd-grid { justify-content: center; }
.pcd-align-right .pcd-grid { justify-content: flex-end; }

/* Header & Typography */
.pcd-header {
  margin-bottom: 8px;
}

.pcd-kicker {
  align-items: center;
  color: var(--pcd-accent);
  display: inline-flex;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
  margin: 0 0 2px;
  text-transform: uppercase;
}

.pcd-live-dot {
  animation: pcd-pulse 2s infinite ease-in-out;
  background-color: var(--pcd-accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--pcd-accent);
  display: inline-block;
  height: 5px;
  margin-right: 5px;
  width: 5px;
}

@keyframes pcd-pulse {
  0% { transform: scale(0.95); opacity: 0.85; }
  50% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 10px var(--pcd-accent); }
  100% { transform: scale(0.95); opacity: 0.85; }
}
.pcd-style-card.pcd-align-center{
	max-width:420px !important;
}
.pcd-title {
  color: var(--pcd-text);
  font-size: clamp(0.92rem, 1.8vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0;
}

/* Individual Unit (Ultra Compact) */
.pcd-unit {
  align-items: center;
  background: var(--pcd-bg-unit);
  border: 1px solid var(--pcd-border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 46px;
  padding: 4px 6px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.pcd-countdown:hover .pcd-unit {
  border-color: var(--pcd-accent-border);
}

.pcd-number {
  color: var(--pcd-accent); /* Logo Blue for digits */
  font-family: inherit;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.pcd-theme-dark .pcd-number {
  color: #ffffff;
}

.pcd-label {
  color: var(--pcd-muted);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-top: 3px;
  text-transform: uppercase;
}

/* Separator Colon (:) */
.pcd-sep {
  align-self: center;
  animation: pcd-blink 1.5s infinite ease-in-out;
  color: var(--pcd-accent);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  margin: 0 -1px;
  opacity: 0.75;
  user-select: none;
}

@keyframes pcd-blink {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 0.35; }
}

/* Status Message */
.pcd-status {
  color: var(--pcd-accent);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 6px 0 0;
}

.pcd-status:empty {
  display: none;
}

.pcd-is-expired .pcd-grid {
  opacity: 0.45;
}

/* Admin notice */
.pcd-admin-notice {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  color: #1e3a8a;
  font-size: 0.8rem;
  margin: 8px 0;
  padding: 8px 12px;
}

/* ==========================================================================
   STYLE VARIANTS: Card, Bar, Minimal (with Container Max-Width Limits)
   ========================================================================== */

/* Style: Card (Ultra Compact Bounded Container) */
.pcd-style-card.pcd-is-compact {
  max-width: 380px;
}
.pcd-style-card.pcd-align-center {
  margin-left: auto;
  margin-right: auto;
}
.pcd-style-card.pcd-align-right {
  margin-left: auto;
  margin-right: 0;
}

/* Style: Bar (Horizontal Single-Row Bounded Banner) */
.pcd-style-bar {
  max-width: 720px; /* Bounded container size - not fullwidth! */
}

.pcd-style-bar.pcd-align-center {
  margin-left: auto;
  margin-right: auto;
}

.pcd-style-bar.pcd-align-right {
  margin-left: auto;
  margin-right: 0;
}

.pcd-style-bar .pcd-shell {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  padding: 8px 14px;
}

.pcd-style-bar .pcd-header {
  margin-bottom: 0;
  text-align: left;
}

.pcd-style-bar .pcd-timer-wrap {
  width: auto;
}

.pcd-style-bar .pcd-status {
  margin-top: 0;
  width: 100%;
}

/* Style: Minimal (No Outer Card Background) */
.pcd-style-minimal {
  max-width: 500px;
}

.pcd-style-minimal.pcd-align-center {
  margin-left: auto;
  margin-right: auto;
}

.pcd-style-minimal.pcd-align-right {
  margin-left: auto;
  margin-right: 0;
}

.pcd-style-minimal .pcd-shell {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.pcd-style-minimal .pcd-shell::before {
  display: none;
}

.pcd-style-minimal .pcd-unit {
  background: #ffffff;
  border: 1px solid var(--pcd-border);
}

/* ==========================================================================
   RESPONSIVE LAYOUT
   ========================================================================== */
@media (max-width: 480px) {
  .pcd-shell {
    padding: 8px 10px;
  }

  .pcd-grid {
    gap: 3px;
  }

  .pcd-unit {
    min-width: 40px;
    padding: 4px 4px;
  }

  .pcd-number {
    font-size: 1rem;
  }

  .pcd-label {
    font-size: 0.52rem;
  }

  .pcd-sep {
    font-size: 0.85rem;
  }

  .pcd-style-bar .pcd-shell {
    flex-direction: column;
    text-align: center;
  }
  
  .pcd-style-bar .pcd-header {
    text-align: center;
  }
}
