/* ==========================================================================
   completeazaonline.ro — gdpr-consent.css
   --------------------------------------------------------------------------
   Stiluri pentru banner GDPR, modal, widget și toast.
   Zero dependințe externe. Se include în <head> sau se încarcă async.
   ========================================================================== */

/* ---------- VARIABILE ---------- */
:root {
  --gdpr-primary: #0f766e;
  --gdpr-primary-hover: #115e59;
  --gdpr-secondary: #475569;
  --gdpr-secondary-hover: #334155;
  --gdpr-bg: #ffffff;
  --gdpr-bg-alt: #f8fafc;
  --gdpr-border: #e2e8f0;
  --gdpr-text: #1e293b;
  --gdpr-text-muted: #64748b;
  --gdpr-shadow: 0 4px 24px rgba(0,0,0,0.12);
  --gdpr-radius: 12px;
  --gdpr-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- BANNER ---------- */
.gdpr-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--gdpr-bg);
  border-top: 1px solid var(--gdpr-border);
  box-shadow: var(--gdpr-shadow);
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--gdpr-text);
  transform: translateY(0);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.gdpr-banner--hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.gdpr-banner__content {
  max-width: 1200px;
  margin: 0 auto;
}

.gdpr-banner__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.gdpr-banner__icon {
  font-size: 28px;
  flex-shrink: 0;
}

.gdpr-banner__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--gdpr-text);
}

.gdpr-banner__subtitle {
  font-size: 12px;
  color: var(--gdpr-text-muted);
  margin: 2px 0 0;
}

.gdpr-banner__body {
  margin-bottom: 16px;
}

.gdpr-banner__text {
  margin: 0 0 8px;
  color: var(--gdpr-text);
}

.gdpr-banner__text--small {
  font-size: 12px;
  color: var(--gdpr-text-muted);
  margin: 0;
}

.gdpr-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ---------- BUTOANE ---------- */
.gdpr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--gdpr-transition);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.gdpr-btn--primary {
  background: var(--gdpr-primary);
  color: #fff;
}

.gdpr-btn--primary:hover {
  background: var(--gdpr-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

.gdpr-btn--secondary {
  background: var(--gdpr-bg-alt);
  color: var(--gdpr-text);
  border: 1px solid var(--gdpr-border);
}

.gdpr-btn--secondary:hover {
  background: var(--gdpr-border);
  border-color: var(--gdpr-secondary);
}

.gdpr-btn--ghost {
  background: transparent;
  color: var(--gdpr-text-muted);
  border: 1px solid transparent;
  padding: 10px 14px;
}

.gdpr-btn--ghost:hover {
  color: var(--gdpr-text);
  background: var(--gdpr-bg-alt);
}

/* ---------- LINK-URI ---------- */
.gdpr-link {
  color: var(--gdpr-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.gdpr-link:hover {
  color: var(--gdpr-primary-hover);
}

/* ---------- MODAL ---------- */
.gdpr-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gdpr-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

.gdpr-modal__content {
  position: relative;
  background: var(--gdpr-bg);
  border-radius: var(--gdpr-radius);
  box-shadow: var(--gdpr-shadow);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  z-index: 1;
  animation: gdpr-modal-in 0.3s ease;
}

@keyframes gdpr-modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.gdpr-modal--hidden .gdpr-modal__content {
  animation: gdpr-modal-out 0.3s ease forwards;
}

@keyframes gdpr-modal-out {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.95); }
}

.gdpr-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--gdpr-bg-alt);
  color: var(--gdpr-text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--gdpr-transition);
}

.gdpr-modal__close:hover {
  background: var(--gdpr-border);
  color: var(--gdpr-text);
}

.gdpr-modal__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  padding-right: 40px;
  color: var(--gdpr-text);
}

.gdpr-modal__intro {
  font-size: 14px;
  color: var(--gdpr-text-muted);
  margin: 0 0 20px;
  line-height: 1.5;
}

/* ---------- CATEGORII ---------- */
.gdpr-modal__categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.gdpr-category {
  border: 1px solid var(--gdpr-border);
  border-radius: 10px;
  overflow: hidden;
  transition: var(--gdpr-transition);
}

.gdpr-category:hover {
  border-color: var(--gdpr-primary);
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.08);
}

.gdpr-category--locked {
  opacity: 0.85;
  background: var(--gdpr-bg-alt);
}

.gdpr-category__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  gap: 12px;
}

.gdpr-category__info {
  flex: 1;
  min-width: 0;
}

.gdpr-category__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 2px;
  color: var(--gdpr-text);
}

.gdpr-category__desc {
  font-size: 12px;
  color: var(--gdpr-text-muted);
  margin: 0;
  line-height: 1.4;
}

.gdpr-category__details {
  padding: 0 16px 14px;
  border-top: 1px solid var(--gdpr-border);
  margin-top: -4px;
}

.gdpr-category__list {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--gdpr-text-muted);
  line-height: 1.6;
}

.gdpr-category__list li {
  margin-bottom: 4px;
}

/* ---------- TOGGLE SWITCH ---------- */
.gdpr-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.gdpr-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.gdpr-toggle__slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  transition: var(--gdpr-transition);
}

.gdpr-toggle__slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--gdpr-transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.gdpr-toggle input:checked + .gdpr-toggle__slider {
  background: var(--gdpr-primary);
}

.gdpr-toggle input:checked + .gdpr-toggle__slider::before {
  transform: translateX(20px);
}

.gdpr-toggle input:focus-visible + .gdpr-toggle__slider {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

.gdpr-toggle--disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.gdpr-toggle--disabled .gdpr-toggle__slider {
  background: var(--gdpr-secondary);
}

.gdpr-toggle--disabled .gdpr-toggle__slider::before {
  transform: translateX(20px);
}

/* ---------- FOOTER MODAL ---------- */
.gdpr-modal__footer {
  border-top: 1px solid var(--gdpr-border);
  padding-top: 16px;
  margin-bottom: 12px;
}

.gdpr-modal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 12px;
}

.gdpr-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.gdpr-modal__dpo {
  background: var(--gdpr-bg-alt);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 12px;
}

.gdpr-modal__dpo-text {
  font-size: 11px;
  color: var(--gdpr-text-muted);
  margin: 0;
  line-height: 1.4;
}

/* ---------- WIDGET FLOTANT ---------- */
.gdpr-widget {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--gdpr-bg);
  color: var(--gdpr-primary);
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--gdpr-transition);
  animation: gdpr-widget-in 0.5s ease 0.3s both;
}

@keyframes gdpr-widget-in {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

.gdpr-widget:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(15, 118, 110, 0.3);
}

.gdpr-widget::after {
  content: "GDPR";
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--gdpr-text);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.gdpr-widget:hover::after {
  opacity: 1;
}

/* ---------- TOAST ---------- */
.gdpr-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gdpr-text);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}

.gdpr-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.gdpr-toast--success {
  background: #059669;
}

.gdpr-toast--info {
  background: #0369a1;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
  .gdpr-banner {
    padding: 16px;
    font-size: 13px;
  }

  .gdpr-banner__title {
    font-size: 16px;
  }

  .gdpr-banner__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .gdpr-btn {
    width: 100%;
    justify-content: center;
  }

  .gdpr-modal {
    padding: 0;
    align-items: flex-end;
  }

  .gdpr-modal__content {
    max-height: 85vh;
    border-radius: var(--gdpr-radius) var(--gdpr-radius) 0 0;
    padding: 20px;
    animation: gdpr-modal-in-mobile 0.3s ease;
  }

  @keyframes gdpr-modal-in-mobile {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }

  .gdpr-modal__actions {
    flex-direction: column;
  }

  .gdpr-widget {
    bottom: 16px;
    left: 16px;
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
}

/* ---------- REDUCERE MIȘCARE ---------- */
@media (prefers-reduced-motion: reduce) {
  .gdpr-banner,
  .gdpr-modal__content,
  .gdpr-widget,
  .gdpr-toast,
  .gdpr-btn,
  .gdpr-toggle__slider,
  .gdpr-toggle__slider::before {
    transition: none !important;
    animation: none !important;
  }
}