/* QualityPack — cookie consent banner.
   GDPR-style 4-category model (necesare / preferințe / statistici / marketing). */

.qp-cookie-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 30, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.qp-cookie-overlay.is-open { display: flex; }

.qp-cookie-card {
  position: relative;
  background: #fff;
  width: min(640px, 100%);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  padding: 1.75rem 1.75rem 1.5rem;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  animation: qp-cookie-pop .25s ease-out;
}
@keyframes qp-cookie-pop {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.qp-cookie-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: #e9f5d8;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.75rem;
  color: #94c93d;
  font-size: 1.3rem;
}
.qp-cookie-title {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 0.5rem;
  color: #1f2a24;
}
.qp-cookie-lead {
  text-align: center;
  color: #6c7770;
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}
.qp-cookie-lead a { color: #94c93d; }

.qp-cookie-groups {
  display: none;
  border-top: 1px solid #eef1f3;
  margin-bottom: 1rem;
}
.qp-cookie-groups.is-visible { display: block; }
.qp-cookie-group {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid #eef1f3;
}
.qp-cookie-group:last-child { border-bottom: 0; }
.qp-cookie-group-info { flex: 1; }
.qp-cookie-group-name {
  font-weight: 600;
  color: #1f2a24;
  margin-bottom: 2px;
}
.qp-cookie-group-desc {
  font-size: 0.82rem;
  color: #6c7770;
  line-height: 1.45;
}

.qp-cookie-switch {
  position: relative;
  width: 40px;
  height: 22px;
  display: inline-block;
  flex-shrink: 0;
}
.qp-cookie-switch input { opacity: 0; width: 0; height: 0; }
.qp-cookie-slider {
  position: absolute;
  inset: 0;
  background: #d4dade;
  border-radius: 22px;
  cursor: pointer;
  transition: background .2s ease;
}
.qp-cookie-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  top: 3px; left: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s ease;
}
.qp-cookie-switch input:checked + .qp-cookie-slider { background: #94c93d; }
.qp-cookie-switch input:checked + .qp-cookie-slider::before { transform: translateX(18px); }
.qp-cookie-switch input:disabled + .qp-cookie-slider { background: #9aa1a6; cursor: not-allowed; }

.qp-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.qp-cookie-btn {
  flex: 1 1 180px;
  border: 0;
  padding: 11px 18px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.92rem;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .15s ease, color .15s ease, transform .1s ease;
}
.qp-cookie-btn:active { transform: scale(0.98); }
.qp-cookie-btn-primary {
  background: #94c93d;
  color: #fff;
}
.qp-cookie-btn-primary:hover { background: #7eb030; color: #fff; }
.qp-cookie-btn-ghost {
  background: #f3f5f7;
  color: #1f2a24;
}
.qp-cookie-btn-ghost:hover { background: #e6eaed; }
.qp-cookie-btn-text {
  background: transparent;
  color: #6c7770;
  text-decoration: underline;
  flex-basis: 100%;
}
.qp-cookie-btn-text:hover { color: #1f2a24; }

.qp-cookie-settings-trigger {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

@media (max-width: 540px) {
  .qp-cookie-card { padding: 1.4rem 1.2rem 1.1rem; }
  .qp-cookie-title { font-size: 1.1rem; }
  .qp-cookie-btn { font-size: 0.85rem; padding: 10px 14px; }
}
