/* ═══════════════════════════════════════
   Cookie Consent Bar — EdPrav
   ═══════════════════════════════════════ */

.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: #fff;
  border-top: 2px solid #1B2F6B;
  box-shadow: 0 -4px 24px rgba(27, 47, 107, 0.10);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease;
  opacity: 0;
}

.cookie-bar--visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-bar--hide {
  transform: translateY(100%);
  opacity: 0;
}

.cookie-bar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

/* Текст */
.cookie-bar__text {
  flex: 1;
  min-width: 0;
}

.cookie-bar__lead {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #374151;
  margin: 0;
}

/* Кнопка «Какие cookie» */
.cookie-bar__details-toggle {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #3B7BF8;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
  display: inline;
}

.cookie-bar__details-toggle:hover {
  color: #1B2F6B;
}

.cookie-bar__arrow {
  display: inline-block;
  transition: transform 0.25s;
}

/* Раскрывающаяся таблица */
.cookie-bar__details {
  margin-top: 14px;
  border-top: 1px solid #E5E7EB;
  padding-top: 12px;
}

.cookie-bar__details[hidden] {
  display: none;
}

/* Таблица cookie */
.cookie-table {
  font-family: 'Manrope', sans-serif;
  font-size: 12.5px;
  line-height: 1.5;
  color: #374151;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
}

.cookie-table__row {
  display: grid;
  grid-template-columns: 160px 130px 1fr 120px;
  gap: 0;
  border-bottom: 1px solid #E5E7EB;
}

.cookie-table__row:last-child {
  border-bottom: none;
}

.cookie-table__row > span {
  padding: 8px 12px;
  border-right: 1px solid #E5E7EB;
}

.cookie-table__row > span:last-child {
  border-right: none;
}

.cookie-table__row--header {
  background: #F4F7FF;
  font-weight: 700;
  color: #1B2F6B;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cookie-table__row--analytics {
  background: #FAFBFF;
}

.cookie-table__row--marketing {
  background: #FAFBFF;
}

.cookie-table code {
  font-family: 'SFMono-Regular', 'Consolas', monospace;
  font-size: 11px;
  background: #EEF2FF;
  color: #1B2F6B;
  padding: 1px 4px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 2px;
}

/* Бейджи типа */
.cookie-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.cookie-badge--required {
  background: #D1FAE5;
  color: #065F46;
}

.cookie-badge--analytics {
  background: #DBEAFE;
  color: #1E40AF;
}

.cookie-badge--marketing {
  background: #FEF3C7;
  color: #92400E;
}

/* Ссылка на политику */
.cookie-bar__policy-link {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  color: #6B7280;
  margin: 10px 0 0;
}

.cookie-bar__policy-link a {
  color: #3B7BF8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-bar__policy-link a:hover {
  color: #1B2F6B;
}

/* Кнопки */
.cookie-bar__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-bar__btn {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  min-width: 140px;
  text-align: center;
}

.cookie-bar__btn--accept {
  background: #3B7BF8;
  color: #fff;
  border-color: #3B7BF8;
}

.cookie-bar__btn--accept:hover {
  background: #1B2F6B;
  border-color: #1B2F6B;
}

.cookie-bar__btn--decline {
  background: transparent;
  color: #6B7280;
  border-color: #D1D5DB;
}

.cookie-bar__btn--decline:hover {
  border-color: #1B2F6B;
  color: #1B2F6B;
}

/* ── Адаптив ── */
@media (max-width: 768px) {
  .cookie-bar__inner {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .cookie-bar__actions {
    flex-direction: row;
    width: 100%;
  }

  .cookie-bar__btn {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
  }

  .cookie-table__row {
    grid-template-columns: 1fr 1fr;
    font-size: 11.5px;
  }

  .cookie-table__row--header {
    display: none;
  }

  .cookie-table__row > span:nth-child(3) {
    grid-column: 1 / -1;
    border-right: none;
  }

  .cookie-table__row > span:nth-child(4) {
    grid-column: 1 / -1;
    border-right: none;
    color: #9CA3AF;
    font-size: 11px;
  }
}

@media (max-width: 400px) {
  .cookie-bar__actions {
    flex-direction: column;
  }
}
