/* Backdrop Overlay styling */
.cat-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

body.admin-bar .cat-popup-overlay {
  top: var(--wp-admin--admin-bar--height, 32px);
}
@media screen and (max-width: 782px) {
  body.admin-bar .cat-popup-overlay {
    top: 46px;
  }
}

.cat-popup-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.cat-popup-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 17, 30, 0.85); /* Midnight Navy Backdrop */
  backdrop-filter: blur(8px);
}

.cat-popup-container {
  position: relative;
  width: 90%;
  max-width: 960px;
  background: #0d1928; /* Deep Navy background */
  border: 1px solid rgba(216, 176, 106, 0.25); /* Subtle Champagne Gold border */
  border-radius: 16px;
  padding: 48px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 2;
}

.cat-popup-overlay.is-active .cat-popup-container {
  transform: scale(1) translateY(0);
}

/* Close Button */
.cat-popup-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #b8c0c9;
  font-size: 28px;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
  padding: 4px;
}

.cat-popup-close:hover {
  color: #d8b06a; /* Champagne Gold accent */
}

/* Header */
.cat-popup-content {
  text-align: center;
}

.cat-popup-heading {
  color: #f5f1e8; /* Warm Ivory text */
  font-family: inherit;
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.cat-popup-subheading {
  color: #b8c0c9; /* Muted blue-gray */
  font-size: 1.1rem;
  margin-bottom: 40px;
}

/* 4-in-a-row minimal grid */
.cat-popup-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .cat-popup-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cat-popup-container {
    padding: 40px 24px;
  }
}

@media (max-width: 600px) {
  .cat-popup-grid {
    grid-template-columns: 1fr;
  }
}

/* Minimal Card styling */
.cat-popup-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 32px 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-align: center;
}

.cat-popup-card:hover {
  background: rgba(216, 176, 106, 0.04);
  border-color: rgba(216, 176, 106, 0.3);
  transform: translateY(-4px);
}

.cat-popup-card-icon {
  width: 48px;
  height: 48px;
  color: #d8b06a; /* Champagne Gold icon */
  margin-bottom: 20px;
  opacity: 0.9;
  transition: transform 0.3s ease;
}

.cat-popup-card:hover .cat-popup-card-icon {
  transform: scale(1.1);
}

.cat-popup-card-title {
  color: #f5f1e8;
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.cat-popup-card-link {
  color: #d8b06a;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: auto;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.cat-popup-card:hover .cat-popup-card-link {
  opacity: 1;
}
