/* ================================================
   Modern Cookie Banner — SVRLogistics
   ================================================ */

#cookie-banner {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 99999;
  width: 100%;
  max-width: 390px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.04),
    0 12px 40px rgba(0, 0, 0, 0.12);
  border-left: 4px solid #FC4C02;
  padding: 22px 22px 20px;
  font-family: 'Rubik', 'Segoe UI', Arial, sans-serif;
  box-sizing: border-box;
  /* Start hidden, below view */
  transform: translateY(calc(100% + 40px));
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.45s cubic-bezier(0.34, 1.45, 0.64, 1),
    opacity 0.35s ease;
}

#cookie-banner.cb-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#cookie-banner.cb-hiding {
  transform: translateY(calc(100% + 40px));
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.6, 1),
    opacity 0.25s ease;
}

/* ---- Header row ---- */
.cb-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cb-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #1a2b40;
  margin: 0;
  line-height: 1.3;
}

.cb-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

/* Close (X) button */
.cb-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #b0bec5;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 6px;
  transition: background 0.18s, color 0.18s;
  flex-shrink: 0;
  margin-left: 10px;
  margin-top: -2px;
  font-family: inherit;
}

.cb-close:hover {
  background: #f5f7fa;
  color: #1a2b40;
}

.cb-close:focus-visible {
  outline: 2px solid #FC4C02;
  outline-offset: 2px;
}

/* ---- Message ---- */
.cb-message {
  font-size: 13px;
  color: #64748b;
  line-height: 1.65;
  margin: 0 0 18px 0;
}

/* ---- Actions row ---- */
.cb-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Accept button */
.cb-btn-accept {
  background: #FC4C02;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 22px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.2s, transform 0.12s, box-shadow 0.2s;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(252, 76, 2, 0.28);
}

.cb-btn-accept:hover {
  background: #e04300;
  box-shadow: 0 4px 14px rgba(252, 76, 2, 0.38);
  transform: translateY(-1px);
}

.cb-btn-accept:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(252, 76, 2, 0.2);
}

.cb-btn-accept:focus-visible {
  outline: 2px solid #FC4C02;
  outline-offset: 3px;
}

/* "Citeste mai mult" outline button */
.cb-btn-more {
  color: #1a2b40;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid #1a2b40;
  border-radius: 8px;
  padding: 7px 18px;
  white-space: nowrap;
  line-height: 1.4;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.12s;
  display: inline-block;
  box-sizing: border-box;
}

.cb-btn-more:hover {
  background: #1a2b40;
  color: #ffffff;
  border-color: #1a2b40;
  text-decoration: none;
  transform: translateY(-1px);
}

.cb-btn-more:active {
  transform: translateY(0);
}

.cb-btn-more:focus-visible {
  outline: 2px solid #FC4C02;
  outline-offset: 3px;
}

/* ---- Progress bar (visual flair) ---- */
.cb-progress {
  height: 3px;
  background: #f1f5f9;
  border-radius: 0 0 12px 0;
  margin: 14px -22px -20px -22px;
  overflow: hidden;
  position: relative;
}

.cb-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FC4C02, #ff7a3d);
  border-radius: inherit;
  animation: cb-progress-anim 8s linear forwards;
  animation-play-state: paused;
}

#cookie-banner.cb-visible .cb-progress-bar {
  animation-play-state: running;
}

@keyframes cb-progress-anim {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
  #cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
    padding: 18px 16px 16px;
    border-radius: 14px;
  }

  .cb-actions {
    flex-wrap: wrap;
  }

  .cb-btn-accept {
    flex: 1;
    text-align: center;
  }
}
