/* ==============================================================
   MODERNIZED & CENTERED COOKIE POPUP (FIXED LAYOUT)
   ============================================================== */

:root {
  --accent-color: #0a0c00;
  --accent-hover: #e3ff04;
  --accent-background: #ffffff;
  --accent-border: #e3e3e3;
  --accent-text-color: #202020;
  --accent-hover-button-text: #0a0c00;
  --accent-title-color: #0a0c00;
  --accent-sub-title-color: #131312;
}

/* Overlay pentru a centra popup-ul */
.cookie-popup-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999999 !important;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.cookie-popup-container * {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  color: var(--accent-text-color);
}

.cookie-popup-container .class-title,
.cookie-popup-container b,
.cookie-popup-container strong {
  font-family: "Unbounded", sans-serif;
  color: var(--accent-title-color);
}

.cookie-popup-container .fa-solid {
  font-family: "Font Awesome 6 Free" !important;
}

/* Cardul Principal */
.cookie-popup-container .cookie-popup {
  position: relative !important;
  max-width: min(600px, 90%);
  background-color: var(--accent-background);
  border: none;
  border-radius: 24px;
  box-sizing: border-box;
  padding: 35px 30px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);

  /* Flexbox magic pentru a rezolva tăierea butoanelor */
  height: auto;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cookie-popup-container .cookie-popup .cookie-popup-content-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Zona de Categorii (Asta va face scroll) */
.cookie-popup-container .cookie-popup-content-container .cookie-mid {
  flex: 1;
  overflow-y: auto;
  padding: 10px 5px 20px 0;
}

/* Ascundem scrollbar-ul nativ pentru design curat */
.cookie-popup-container
  .cookie-popup-content-container
  .cookie-mid::-webkit-scrollbar {
  display: none;
}

/* Sagetile stanga-dreapta */
.cookie-popup .cookie-panel {
  position: absolute;
  top: 25px;
  right: 25px;
  z-index: 10;
}

.cookie-popup .cookie-panel ul {
  list-style-type: none;
  display: flex;
  padding-left: 0 !important;
  margin: 0 !important;
}

.cookie-popup .cookie-panel ul li {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--smoke-color);
  border-radius: 50%;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  color: var(--accent-color);
  transition: 0.3s;
}

.cookie-popup .cookie-panel ul li:hover {
  background: #e8e8e8;
}

/* Texte */
.cookie-popup-container .cookie-popup-content-container .cookie-mid p {
  font-size: 14px;
  line-height: 1.6;
  margin-top: 10px;
  margin-bottom: 20px;
  color: #555;
}

.cookie-popup-container .cookie-popup p.max-perc {
  max-width: 90%;
}

.cookie-popup-container .cookie-popup-content-container .cookie-mid b {
  font-size: 20px;
  line-height: 1.2;
  color: var(--accent-title-color);
}

.cookie-popup-container
  .cookie-popup-content-container
  .cookie-mid
  .cookie-consent,
.cookie-popup-container
  .cookie-popup-content-container
  .cookie-mid
  .cookie-cookies-display {
  display: none;
}

/* Categoriile individuale */
.cookie-cookies-display .cookie-category,
.cookie-consent .cookie-category {
  margin-bottom: 15px;
  background: #fcfcfc;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
}

/* Checkbox-uri */
.cookie-cookies-display .cookie-category .choose,
.cookie-consent .cookie-category .choose {
  font-size: 12px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid #ccc;
  margin-right: 15px;
  cursor: pointer;
  background: transparent;
  position: relative;
  transition: 0.3s;
}

.cookie-cookies-display .cookie-category .choose.active,
.cookie-consent .cookie-category .choose.active {
  border-color: var(--accent-color);
  background-color: var(--accent-color);
}

.cookie-cookies-display .cookie-category .choose.active:after,
.cookie-consent .cookie-category .choose.active:after,
.cookie-consent .cookie-category .choose.always-on:after,
.cookie-cookies-display .cookie-category .choose.always-on:after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 12px;
  border: solid var(--accent-hover);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.cookie-cookies-display .cookie-category .choose.always-on,
.cookie-consent .cookie-category .choose.always-on {
  border-color: #d1d1d1;
  background-color: #f0f0f0;
  cursor: not-allowed;
}

.cookie-cookies-display .cookie-category .choose.always-on:after,
.cookie-consent .cookie-category .choose.always-on:after {
  border-color: #999;
}

.cookie-cookies-display .cookie-category .data .data-resume .cat-main,
.cookie-cookies-display .cookie-category .data .data-resume .cat-main > div,
.cookie-consent .cookie-category .data .data-resume .cat-main,
.cookie-consent .cookie-category .data .data-resume .cat-main > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.data-resume .cookie-cat-name {
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

.cookie-cookies-display .cookie-category .data .data-resume .cat-describe,
.cookie-consent .cookie-category .data .data-resume .cat-describe {
  font-size: 13px;
  line-height: 1.5;
  color: #666;
  margin-top: 8px;
}

/* =======================================================
   REPARATIE BUTOANE DE JOS (COOKIE-DECIDE)
   ======================================================= */
.cookie-decide {
  position: relative !important;
  top: auto !important;
  width: 100% !important;
  margin-top: 15px;
  padding-top: 15px;
  padding-right: 0 !important;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0; /* Impiedicam strivirea containerului */
}

.cookie-decide ul {
  list-style-type: none;
  display: flex;
  justify-content: space-between;
  padding-left: 0 !important;
  margin: 0 !important;
  gap: 15px;
}

.cookie-decide ul li {
  flex: 1; /* Le facem egale ca latime */
  text-align: center;
  border-radius: 50px;
  padding: 12px 20px;
  font-weight: 600;
  font-family: var(--title-font);
  font-size: 13px;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.cookie-decide ul li.allow {
  background-color: var(--accent-color);
  color: var(--accent-hover);
  border: 2px solid var(--accent-color);
}

.cookie-decide ul li.allow:hover {
  background-color: var(--accent-hover);
  color: var(--accent-color);
  border-color: var(--accent-hover);
}

.cookie-decide ul li.customize {
  background-color: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-border);
}

.cookie-decide ul li.customize i {
  margin-right: 8px;
  transition: 300ms;
}

.cookie-decide ul li.customize:hover {
  border-color: var(--accent-color);
}

.cookie-decide ul li.customize:hover i {
  animation: spin-animation 0.5s infinite linear;
}

.cookie-decide ul li.allow-selection {
  background-color: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  display: none;
}

.cookie-decide ul li.allow-selection:hover {
  background-color: var(--accent-color);
  color: var(--accent-hover);
}

.cookie-popup-container a.policy-href {
  text-decoration: underline;
  color: var(--accent-color) !important;
  font-weight: 600 !important;
  transition: 300ms;
}

.cookie-popup-container a.policy-href:hover {
  color: var(--accent-hover) !important;
}

/* Tabs */
.cookie-popup-container .tab-wrap {
  display: flex;
  flex-wrap: wrap;
  position: relative;
  list-style: none;
  margin: 20px 0;
  background: #f0f0f0;
  border-radius: 12px;
  padding: 5px;
}

.cookie-popup-container .tab {
  display: none;
}

.cookie-popup-container .tab + label {
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: #666;
  flex-grow: 1;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  transition: 0.3s;
  padding: 10px 15px;
  border-radius: 8px;
}

.cookie-popup-container .tab:checked + label {
  background-color: #fff;
  color: var(--accent-title-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cookie-popup-container .tab__content {
  padding: 20px 5px 0;
  background-color: transparent;
  position: absolute;
  width: 100%;
  z-index: -1;
  opacity: 0;
  left: 0;
  transform: translateY(10px);
  border-radius: 6px;
}

.cookie-popup-container
  .tab:checked:nth-of-type(1)
  ~ .tab__content:nth-of-type(1),
.cookie-popup-container
  .tab:checked:nth-of-type(2)
  ~ .tab__content:nth-of-type(2) {
  opacity: 1;
  transition:
    0.5s opacity ease,
    0.5s transform ease;
  position: relative;
  z-index: 100;
  transform: translateY(0);
}

.cookie-popup-container .data-resume .sub-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--accent-title-color);
}

.cookie-popup span.hidden {
  display: none;
}

.cookie-popup .cookie-panel ul li.consent-panel,
.cookie-popup .cookie-panel ul li.details-panel {
  visibility: hidden;
}

@keyframes spin-animation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}

@media screen and (max-width: 767px) {
  .cookie-popup-container .cookie-popup {
    padding: 25px 20px;
    height: min(80vh, 500px);
  }
  .cookie-decide ul {
    flex-direction: column;
  }
  .cookie-decide ul li {
    width: 100%;
    margin-bottom: 10px;
  }
  .cookie-popup .cookie-panel {
    top: 15px;
    right: 15px;
  }
}
