/**
* Artificial Cookie Guard - Tailwind Style
*/

/* 1. CSS Variables (Light & Dark Mode) */
:root {
  --acg-bg: #ffffff;
  --acg-text: var(--wp--preset--color--primary,#ccac58);
  --acg-text-muted: #9ca3af; /* Tailwind gray-500 */
  --acg-border: #374151; /* Tailwind gray-200 */
  --acg-surface: #ffffff;
  --acg-primary: var(--wp--preset--color--primary,#ccac58); /* Tailwind blue-600 */
  --acg-primary-hover: var(
    --wp--preset--color--accent,
    #9acd32
  ); /* Tailwind blue-700 */
  --acg-code-bg: #374151; /* Tailwind gray-100 */
  --acg-code-text: #fca5a5; /* Tailwind red-500 */
  --acg-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --acg-radius-lg: 16px;
  --acg-radius-md: 8px;
}

/* 2. Banner Layout (Floating Card) */
.acg-banner-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999999;
  font-family: var(--acg-font);
  /* Reset για να μην επηρεάζεται από το theme */
  box-sizing: border-box;
}

.acg-banner-container * {
  box-sizing: border-box;
}

.acg-banner-card {
  background-color: var(--acg-bg);
  color: var(--acg-text);
  width: 100%;
  max-width: 420px;
  border-radius: var(--acg-radius-lg);
  box-shadow: var(--acg-shadow);
  border: 1px solid var(--acg-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Smooth fade in */
  opacity: 0;
  transform: translateY(20px);
  animation: acgFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes acgFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 3. Typography & Header */
.acg-banner-header {
  padding: 24px 24px 16px;
}

.acg-banner-header h3 {
  margin: 0 0 8px 0 !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: var(--acg-text) !important;
  line-height: 1.2 !important;
}

.acg-banner-header p {
  margin: 0 !important;
  font-size: 0.875rem !important;
  color: var(--acg-text-muted) !important;
  line-height: 1.5 !important;
}

/* 4. Accordions (Native <details>) */
.acg-accordion-group {
  padding: 0 24px;
  max-height: 40vh; /* Scroll αν είναι πολλά */
  overflow-y: auto;
}

.acg-accordion {
  border-bottom: 1px solid var(--acg-border);
}
.acg-accordion:last-child {
  border-bottom: none;
}

.acg-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  cursor: pointer;
  list-style: none; /* Κρύβει το default βελάκι */
  user-select: none;
}
/* Κρύβουμε το βελάκι του webkit */
.acg-accordion-header::-webkit-details-marker {
  display: none;
}

.acg-category-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.acg-category-title strong {
  font-size: 0.95rem;
  font-weight: 600;
}

/* Custom Checkboxes */
.acg-category-title input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--acg-primary);
}

.acg-category-title input[type="checkbox"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Custom Chevron for Accordion */
.acg-chevron {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--acg-text-muted);
  border-bottom: 2px solid var(--acg-text-muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

details[open] .acg-chevron {
  transform: translateY(2px) rotate(-135deg);
}

.acg-accordion-body {
  padding: 0 0 16px 30px;
}

.acg-accordion-body p {
  font-size: 0.8rem !important;
  color: var(--acg-text-muted) !important;
  margin: 0 0 10px 0 !important;
  line-height: 1.4 !important;
}

.acg-cookie-list {
  display: block;
  font-size: 0.75rem;
  color: var(--acg-text-muted);
}

.acg-cookie-list code {
  background: var(--acg-code-bg);
  color: var(--acg-code-text);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.7rem;
  margin-right: 4px;
}

/* 5. Actions / Buttons */
.acg-banner-actions {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
  background: var(--acg-surface);
  border-top: 1px solid var(--acg-border);
}

.acg-btn {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--acg-radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.acg-btn-primary {
  background-color: var(--acg-btn-primary-bg) !important;
  color: #ffffff;
}

.acg-btn-primary:hover {
  background-color: var(--acg-btn-primary-hover-bg) !important;
  color: var(--acg-btn-primary-hover-text) !important;
}

.acg-btn-outline {
  background-color: transparent;
  color: var(--acg-text);
  border: 1px solid var(--acg-border);
}

.acg-btn-outline:hover {
  background-color: var(--acg-btn-primary-hover-bg);
}

/* 6. Custom Placeholders (Maps, YouTube κλπ) */
div:has(iframe) {
  position: relative;
}
.acg-iframe-placeholder {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-color: var(--acg-surface);
  border: 1px dashed var(--acg-border);
  border-radius: var(--acg-radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
}

.acg-placeholder-card {
  /*   background-color: var(--acg-surface);
	border: 1px dashed var(--acg-border);
	border-radius: var(--acg-radius-lg); */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 1.5em;
  font-family: var(--acg-font);
  color: var(--acg-text);
  /* Δίνουμε ένα ελάχιστο ύψος για να μην 'χοροπηδάει' η σελίδα */
  min-height: inherit;
}

.acg-placeholder-inner {
  max-width: 400px;
}

.acg-placeholder-icon {
  margin-bottom: 16px;
  color: var(--acg-text-muted);
}

.acg-custom-placeholder h4 {
  margin: 0 0 8px 0 !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: var(--acg-text) !important;
}

.acg-custom-placeholder p {
  font-size: 0.9rem !important;
  color: var(--acg-text-muted) !important;
  margin: 0 0 20px 0 !important;
  line-height: 1.5 !important;
}

/* 7. Mobile Responsiveness */
@media (max-width: 480px) {
  .acg-banner-container {
    bottom: 12px;
    left: 12px;
    right: 12px;
    width: calc(100% - 24px);
  }
  .acg-banner-card {
    max-width: 100%;
  }
  .acg-banner-actions {
    flex-direction: column-reverse;
  }
  .acg-btn {
    width: 100%;
  }
}
