/* ══════════════════════════════════════════════════════
   Cookie Consent Bar + Modal — appme
══════════════════════════════════════════════════════ */

/* ── Bar ── */
#cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 1rem 1.5rem;
  background: rgba(8, 4, 14, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  transform: translateY(110%);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

#cookie-bar.cb-visible {
  transform: translateY(0);
}

/* left block */
.cb-left {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  flex: 1;
  min-width: 240px;
}

.cb-icon {
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, rgba(12, 181, 210, 0.18), rgba(83, 17, 89, 0.18));
  border: 1px solid rgba(12, 181, 210, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #0cb5d2;
}

.cb-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cb-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.cb-desc {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
}

/* right block */
.cb-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cb-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(12, 181, 210, 0.85);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.45rem 0.6rem;
  border-radius: 0.4rem;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.cb-link:hover {
  color: #0cb5d2;
  background: rgba(12, 181, 210, 0.08);
}

.cb-btn {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.5rem 1.1rem;
  border-radius: 0.6rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.cb-btn-decline {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.cb-btn-decline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}

.cb-btn-accept {
  background: linear-gradient(135deg, #0cb5d2, #531159);
  color: #fff;
  box-shadow: 0 4px 18px rgba(12, 181, 210, 0.28);
}
.cb-btn-accept:hover {
  box-shadow: 0 6px 24px rgba(12, 181, 210, 0.42);
  transform: translateY(-1px);
}

/* ── Cookies Modal ── */
#cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#cookie-modal.cm-open {
  opacity: 1;
  pointer-events: all;
}

.cm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cm-panel {
  position: relative;
  z-index: 1;
  background: #0e0818;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(12, 181, 210, 0.06);
  width: 100%;
  max-width: 680px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
#cookie-modal.cm-open .cm-panel {
  transform: translateY(0) scale(1);
}

.cm-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.cm-header-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, rgba(12,181,210,.15), rgba(83,17,89,.15));
  border: 1px solid rgba(12, 181, 210, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #0cb5d2;
  flex-shrink: 0;
}

.cm-header-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.cm-header-sub {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.1rem;
}

.cm-close {
  margin-left: auto;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 0.5rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  transition: all 0.2s;
  flex-shrink: 0;
}
.cm-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.cm-body {
  overflow-y: auto;
  padding: 1.5rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  line-height: 1.75;
  flex: 1;
}

.cm-body::-webkit-scrollbar { width: 4px; }
.cm-body::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
.cm-body::-webkit-scrollbar-thumb { background: rgba(12,181,210,0.3); border-radius: 2px; }

.cm-body h1, .cm-body h2, .cm-body h3 {
  color: #fff;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
}
.cm-body > :first-child { margin-top: 0; }
.cm-body h1 { font-size: 1.1rem; }
.cm-body h2 { font-size: 1rem; }
.cm-body h3 { font-size: 0.9rem; color: rgba(255,255,255,0.85); }
.cm-body p  { margin: 0 0 0.75rem; }
.cm-body ul, .cm-body ol { padding-left: 1.4rem; margin: 0 0 0.75rem; }
.cm-body li { margin-bottom: 0.3rem; }
.cm-body ol ol { list-style-type: lower-alpha; }
.cm-body ol ol ol { list-style-type: lower-roman; }
.cm-body a  { color: #0cb5d2; }
.cm-body strong { color: rgba(255,255,255,0.9); font-weight: 600; }
/* Polityki cookies czesto maja tabele z lista ciasteczek. */
.cm-body table {
  width: 100%; border-collapse: collapse;
  margin: 0 0 0.75rem; font-size: 0.78rem;
}
.cm-body th, .cm-body td {
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0.4rem 0.5rem; text-align: left; vertical-align: top;
}
.cm-body th { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.85); font-weight: 600; }

.cm-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 3rem 1rem;
  color: rgba(255,255,255,0.35);
  font-size: 0.85rem;
}

.cm-spinner {
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid rgba(12,181,210,0.2);
  border-top-color: #0cb5d2;
  border-radius: 50%;
  animation: cm-spin 0.7s linear infinite;
}
@keyframes cm-spin { to { transform: rotate(360deg); } }

.cm-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  #cookie-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem;
  }
  .cb-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
