/*!
 * GDPR Cookies Consent — CarServ Electronic
 * Adaptat din plg_system_gdprcookies (MC General Construct)
 * Culori adaptate la tema CarServ Electronic (#e82227 rosu)
 */

.gdpr-mc-root {
  --gdpr-mc-primary:       #e82227;
  --gdpr-mc-primary-hover: #c41a1f;
  --gdpr-mc-secondary:     #fbbc04;
  --gdpr-mc-text:          #1a1a1a;
  --gdpr-mc-text-muted:    rgba(26, 26, 26, 0.65);
  --gdpr-mc-bg:            #ffffff;
  --gdpr-mc-border:        rgba(0, 0, 0, 0.12);
  --gdpr-mc-border-radius: 10px;
  --gdpr-mc-font:          'Poppins', sans-serif;
  --gdpr-mc-shadow:        0 18px 48px rgba(232, 34, 39, 0.13), 0 0 0 1px rgba(232, 34, 39, 0.06);
  --gdpr-mc-shadow-modal:  0 30px 80px rgba(0, 0, 0, 0.35);
  --gdpr-mc-z:             999999;
  --gdpr-mc-z-modal:       1000000;
}

/* ===== Banner ===== */
.gdpr-mc-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  z-index: var(--gdpr-mc-z);
  background: var(--gdpr-mc-bg);
  color: var(--gdpr-mc-text);
  border-radius: calc(var(--gdpr-mc-border-radius) + 4px);
  box-shadow: var(--gdpr-mc-shadow);
  max-width: 980px;
  margin: 0 auto;
  font-family: var(--gdpr-mc-font);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transition: transform .55s cubic-bezier(.34,1.56,.64,1), opacity .4s ease, visibility 0s linear .55s;
  border: 1px solid var(--gdpr-mc-border);
}

.gdpr-mc-pos-bottom .gdpr-mc-banner {
  bottom: 20px;
  transform: translateY(140%) scale(.96);
}
.gdpr-mc-pos-top .gdpr-mc-banner {
  top: 20px;
  transform: translateY(-140%) scale(.96);
}
.gdpr-mc-banner.is-shown {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  transition: transform .55s cubic-bezier(.34,1.56,.64,1), opacity .4s ease, visibility 0s;
}

/* Linie decorativa gradient rosie */
.gdpr-mc-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gdpr-mc-primary) 0%, var(--gdpr-mc-secondary) 100%);
}

.gdpr-mc-banner-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 26px;
}

.gdpr-mc-icon {
  font-size: 38px;
  flex-shrink: 0;
  line-height: 1;
}

.gdpr-mc-btn-icon {
  display: inline-block;
  margin-right: 4px;
  font-size: 13px;
  line-height: 1;
}

.gdpr-mc-text {
  flex: 1 1 auto;
  min-width: 0;
}
.gdpr-mc-text h3 {
  margin: 0 0 6px 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--gdpr-mc-primary);
  font-family: var(--gdpr-mc-font);
  line-height: 1.3;
}
.gdpr-mc-text p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--gdpr-mc-text-muted);
}
.gdpr-mc-policy-link {
  color: var(--gdpr-mc-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 2px;
}
.gdpr-mc-policy-link:hover,
.gdpr-mc-policy-link:focus {
  color: var(--gdpr-mc-primary-hover);
}

.gdpr-mc-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: wrap;
}

/* ===== Butoane ===== */
.gdpr-mc-btn {
  padding: 11px 20px;
  border-radius: 999px;
  font-family: var(--gdpr-mc-font);
  font-weight: 600;
  font-size: 13px;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gdpr-mc-btn:focus { outline: 2px solid var(--gdpr-mc-primary); outline-offset: 2px; }

/* Accept */
.gdpr-mc-btn-accept {
  background: var(--gdpr-mc-primary);
  color: #fff;
  border-color: var(--gdpr-mc-primary);
  box-shadow: 0 6px 16px rgba(232, 34, 39, .28);
}
.gdpr-mc-btn-accept:hover,
.gdpr-mc-btn-accept:focus {
  background: var(--gdpr-mc-primary-hover);
  border-color: var(--gdpr-mc-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(232, 34, 39, .35);
  color: #fff;
}

/* Respinge */
.gdpr-mc-btn-reject {
  background: transparent;
  color: var(--gdpr-mc-text);
  border-color: var(--gdpr-mc-border);
}
.gdpr-mc-btn-reject:hover,
.gdpr-mc-btn-reject:focus {
  background: rgba(26, 26, 26, 0.05);
  border-color: rgba(26, 26, 26, 0.3);
  color: var(--gdpr-mc-text);
}

/* Preferinte */
.gdpr-mc-btn-settings {
  background: transparent;
  color: var(--gdpr-mc-primary);
  border-color: rgba(232, 34, 39, 0.3);
}
.gdpr-mc-btn-settings:hover,
.gdpr-mc-btn-settings:focus {
  background: rgba(232, 34, 39, 0.06);
  border-color: var(--gdpr-mc-primary);
  color: var(--gdpr-mc-primary-hover);
}

/* ===== Modal ===== */
.gdpr-mc-modal {
  position: fixed;
  inset: 0;
  z-index: var(--gdpr-mc-z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: var(--gdpr-mc-font);
  color: var(--gdpr-mc-text);
}
.gdpr-mc-modal.is-open {
  display: flex;
  animation: gdprMcFadeIn .25s ease;
}
.gdpr-mc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 41, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.gdpr-mc-dialog {
  position: relative;
  background: var(--gdpr-mc-bg);
  border-radius: calc(var(--gdpr-mc-border-radius) + 4px);
  box-shadow: var(--gdpr-mc-shadow-modal);
  max-width: 640px;
  width: 100%;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: gdprMcSlideIn .3s cubic-bezier(.34,1.56,.64,1);
}
.gdpr-mc-dialog::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gdpr-mc-primary) 0%, var(--gdpr-mc-secondary) 100%);
}
.gdpr-mc-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 0;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--gdpr-mc-text-muted);
  cursor: pointer;
  line-height: 1;
  z-index: 2;
  transition: background-color .2s, color .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gdpr-mc-close:hover,
.gdpr-mc-close:focus {
  background: rgba(26, 26, 26, 0.08);
  color: var(--gdpr-mc-text);
  outline: none;
}
.gdpr-mc-modal-header {
  padding: 28px 28px 14px;
}
.gdpr-mc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232, 34, 39, 0.08);
  color: var(--gdpr-mc-primary);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.gdpr-mc-modal-header h2 {
  margin: 0 0 6px 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--gdpr-mc-primary);
  font-family: var(--gdpr-mc-font);
  line-height: 1.25;
}
.gdpr-mc-modal-header p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--gdpr-mc-text-muted);
}

.gdpr-mc-modal-body {
  padding: 8px 28px 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex: 1 1 auto;
  min-height: 0;
}

/* ===== Categorii cookie ===== */
.gdpr-mc-category {
  background: rgba(232, 34, 39, 0.03);
  border: 1px solid var(--gdpr-mc-border);
  border-radius: var(--gdpr-mc-border-radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: border-color .2s, background-color .2s;
}
.gdpr-mc-category:hover {
  border-color: rgba(232, 34, 39, 0.35);
  background: rgba(232, 34, 39, 0.05);
}
.gdpr-mc-category-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.gdpr-mc-category-info {
  flex: 1;
  min-width: 0;
}
.gdpr-mc-category-info h4 {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--gdpr-mc-primary);
  font-family: var(--gdpr-mc-font);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.gdpr-mc-cat-icon {
  font-size: 16px;
  line-height: 1;
}
.gdpr-mc-category-info p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gdpr-mc-text-muted);
}

/* Details expandabil */
.gdpr-mc-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--gdpr-mc-border);
}
.gdpr-mc-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--gdpr-mc-primary);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  transition: color .2s;
}
.gdpr-mc-details summary::-webkit-details-marker { display: none; }
.gdpr-mc-details summary::after {
  content: "\25BE";
  font-size: 10px;
  transition: transform .2s ease;
  margin-left: 2px;
}
.gdpr-mc-details[open] summary::after { transform: rotate(180deg); }
.gdpr-mc-details summary:hover { color: var(--gdpr-mc-primary-hover); }
.gdpr-mc-details p {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--gdpr-mc-text-muted);
}

/* ===== Toggle switch ===== */
.gdpr-mc-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}
.gdpr-mc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.gdpr-mc-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background-color .3s;
}
.gdpr-mc-slider::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform .3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.gdpr-mc-toggle input:checked + .gdpr-mc-slider {
  background: var(--gdpr-mc-primary);
}
.gdpr-mc-toggle input:checked + .gdpr-mc-slider::before {
  transform: translateX(20px);
}
.gdpr-mc-toggle-locked {
  cursor: not-allowed;
  opacity: 0.7;
}
.gdpr-mc-toggle-locked .gdpr-mc-slider {
  background: #34a853;
}

/* ===== Footer modal ===== */
.gdpr-mc-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px 24px;
  border-top: 1px solid var(--gdpr-mc-border);
  background: rgba(232, 34, 39, 0.02);
  flex-wrap: wrap;
}

/* ===== Animatii ===== */
@keyframes gdprMcFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes gdprMcSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Buton flotant "Setări Cookies" ===== */
.gdpr-mc-floating {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: calc(var(--gdpr-mc-z) - 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  background: var(--gdpr-mc-bg);
  color: var(--gdpr-mc-primary);
  border: 1.5px solid rgba(232, 34, 39, 0.25);
  border-radius: 999px;
  font-family: var(--gdpr-mc-font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(232, 34, 39, .15), 0 0 0 1px rgba(232, 34, 39, .04);
  transform: translateY(8px) scale(.96);
  opacity: 0;
  transition: opacity .35s ease, transform .35s cubic-bezier(.34,1.56,.64,1), background-color .2s, border-color .2s, color .2s;
}
.gdpr-mc-floating[hidden] { display: none !important; }
.gdpr-mc-floating.is-shown {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.gdpr-mc-floating:hover,
.gdpr-mc-floating:focus {
  background: var(--gdpr-mc-primary);
  color: #fff;
  border-color: var(--gdpr-mc-primary);
  outline: none;
  box-shadow: 0 8px 24px rgba(232, 34, 39, .3);
}
.gdpr-mc-floating-icon {
  font-size: 18px;
  line-height: 1;
}
.gdpr-mc-floating-label {
  white-space: nowrap;
}

/* ===== Scroll lock ===== */
body.gdpr-mc-scroll-locked {
  position: fixed !important;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden !important;
}

/* ===== Responsive — Tableta ===== */
@media (max-width: 768px) {
  .gdpr-mc-banner { left: 12px; right: 12px; bottom: 12px; }
  .gdpr-mc-pos-top .gdpr-mc-banner { top: 12px; }
  .gdpr-mc-banner-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 14px;
    padding: 20px 18px;
  }
  .gdpr-mc-icon { margin: 0 auto; font-size: 34px; }
  .gdpr-mc-actions { flex-wrap: wrap; justify-content: center; }
  .gdpr-mc-btn { flex: 1 1 auto; min-width: 120px; }

  .gdpr-mc-modal { padding: 12px; }
  .gdpr-mc-dialog {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
  .gdpr-mc-modal-header { padding: 22px 22px 10px; }
  .gdpr-mc-modal-header h2 { font-size: 19px; }
  .gdpr-mc-modal-header p { font-size: 13px; line-height: 1.5; }
  .gdpr-mc-modal-body { padding: 6px 22px 10px; }
  .gdpr-mc-category { padding: 13px 15px; margin-bottom: 10px; }
  .gdpr-mc-modal-footer { padding: 12px 22px 16px; gap: 8px; }
}

/* ===== Responsive — Telefon ===== */
@media (max-width: 480px) {
  .gdpr-mc-banner { left: 8px; right: 8px; bottom: 8px; }
  .gdpr-mc-pos-top .gdpr-mc-banner { top: 8px; }
  .gdpr-mc-banner-inner { padding: 18px 14px; gap: 12px; }
  .gdpr-mc-text h3 { font-size: 15px; }
  .gdpr-mc-text p { font-size: 12.5px; line-height: 1.45; }
  .gdpr-mc-btn { padding: 10px 14px; font-size: 12.5px; width: 100%; }

  .gdpr-mc-floating {
    left: 12px;
    bottom: 12px;
    padding: 10px 12px;
    font-size: 12px;
  }
  .gdpr-mc-floating-label { display: none; }

  .gdpr-mc-modal { padding: 6px; align-items: flex-end; }
  .gdpr-mc-dialog {
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 14px;
  }
  .gdpr-mc-close {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 22px;
  }
  .gdpr-mc-modal-header { padding: 16px 18px 8px; }
  .gdpr-mc-eyebrow { font-size: 10px; padding: 4px 10px; margin-bottom: 6px; letter-spacing: .8px; }
  .gdpr-mc-modal-header h2 { font-size: 17px; margin-bottom: 4px; }
  .gdpr-mc-modal-header p { font-size: 12px; line-height: 1.4; }
  .gdpr-mc-modal-body { padding: 4px 14px 8px; }
  .gdpr-mc-category { padding: 9px 12px; margin-bottom: 7px; border-radius: 10px; }
  .gdpr-mc-category-head { gap: 10px; }
  .gdpr-mc-category-info h4 { font-size: 13px; gap: 6px; margin-bottom: 2px; }
  .gdpr-mc-cat-icon { font-size: 14px; }
  .gdpr-mc-category-info p { font-size: 11.5px; line-height: 1.35; }
  .gdpr-mc-toggle { width: 38px; height: 22px; }
  .gdpr-mc-slider::before { width: 16px; height: 16px; left: 3px; top: 3px; }
  .gdpr-mc-toggle input:checked + .gdpr-mc-slider::before { transform: translateX(16px); }
  .gdpr-mc-details { margin-top: 8px; padding-top: 8px; }
  .gdpr-mc-details summary { font-size: 10px; letter-spacing: .4px; }
  .gdpr-mc-details summary::after { font-size: 9px; }
  .gdpr-mc-details p { font-size: 11.5px; line-height: 1.45; margin-top: 6px; }
  .gdpr-mc-modal-footer { padding: 10px 14px 12px; gap: 8px; flex-wrap: nowrap; justify-content: stretch; }
  .gdpr-mc-modal-footer .gdpr-mc-btn { padding: 10px 12px; font-size: 12px; min-width: 0; flex: 1 1 0; }
}

/* ===== Ecrane foarte scurte (landscape) ===== */
@media (max-height: 600px) and (max-width: 768px) {
  .gdpr-mc-modal-header { padding-top: 14px; padding-bottom: 6px; }
  .gdpr-mc-modal-header h2 { font-size: 16px; }
  .gdpr-mc-eyebrow { display: none; }
  .gdpr-mc-modal-header p { display: none; }
  .gdpr-mc-category { padding: 8px 12px; margin-bottom: 6px; }
  .gdpr-mc-details { display: none; }
}
