/* ═══════════════════════════════════════════════════════════
   ROBOTUJ SYSTEMS — COOKIE CONSENT & PREFERENCES
   Styling for Cookie Banner and Preferences Modal
   ═══════════════════════════════════════════════════════════ */

/* ── Banner lišta ── */
#robotuj-cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 20px;
  right: 20px;
  max-width: 1080px;
  margin-inline: auto;
  z-index: 9999;
  background: color-mix(in srgb, var(--bg-raise, #ffffff) 94%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--line, #e0ddd5);
  border-radius: 22px;
  box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.22);
  padding: 22px 26px;
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
  color: var(--tx, #16181d);
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.4s cubic-bezier(0.25, 0.9, 0.3, 1), transform 0.4s cubic-bezier(0.25, 0.9, 0.3, 1);
  pointer-events: none;
  visibility: hidden;
}

#robotuj-cookie-banner.rc-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
}

.rc-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.rc-banner-content {
  flex: 1;
  min-width: 0;
}

.rc-banner-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.rc-cookie-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.rc-banner-title {
  font-family: var(--font-head, 'Space Grotesk', sans-serif);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--tx, #16181d);
  margin: 0;
}

.rc-banner-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--tx-2, #52504b);
  margin: 0;
}

.rc-banner-text a {
  color: var(--orange, #ff4a17);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.rc-banner-text a:hover {
  color: var(--orange-dim, #d93a0c);
}

.rc-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.rc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head, 'Space Grotesk', sans-serif);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 20px;
  border-radius: 13px;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(0.25, 0.9, 0.3, 1), box-shadow 0.25s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.rc-btn-primary {
  background: var(--orange, #ff4a17);
  color: #ffffff;
  box-shadow: 0 8px 20px -6px rgba(255, 74, 23, 0.45);
}

.rc-btn-primary:hover {
  background: var(--orange-dim, #d93a0c);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -6px rgba(255, 74, 23, 0.55);
}

.rc-btn-secondary {
  background: var(--bg-sink, #efece5);
  color: var(--tx, #16181d);
  border-color: var(--line, #e0ddd5);
}

.rc-btn-secondary:hover {
  background: var(--bg-raise, #ffffff);
  border-color: var(--tx-3, #8b8880);
  transform: translateY(-2px);
}

.rc-btn-link {
  background: transparent;
  color: var(--tx-2, #52504b);
  border-color: transparent;
  padding: 11px 14px;
}

.rc-btn-link:hover {
  color: var(--orange, #ff4a17);
  background: color-mix(in srgb, var(--orange, #ff4a17) 8%, transparent);
}

/* ── Modální okno předvoleb (Preferences Modal) ── */
#robotuj-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(16, 19, 28, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.25, 0.9, 0.3, 1), visibility 0.35s ease;
}

#robotuj-cookie-modal.rc-modal-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.rc-modal-card {
  background: var(--bg-raise, #ffffff);
  border: 1.5px solid var(--line, #e0ddd5);
  border-radius: 26px;
  box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.35);
  max-width: 620px;
  width: 100%;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
  color: var(--tx, #16181d);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.25, 0.9, 0.3, 1);
}

#robotuj-cookie-modal.rc-modal-open .rc-modal-card {
  transform: translateY(0) scale(1);
}

.rc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line, #e0ddd5);
}

.rc-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rc-modal-title {
  font-family: var(--font-head, 'Space Grotesk', sans-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.rc-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line, #e0ddd5);
  background: var(--bg-sink, #efece5);
  color: var(--tx-2, #52504b);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.rc-modal-close:hover {
  background: var(--orange, #ff4a17);
  color: #ffffff;
  border-color: var(--orange, #ff4a17);
}

.rc-modal-body {
  padding: 20px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rc-modal-intro {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--tx-2, #52504b);
  margin-bottom: 4px;
}

.rc-modal-intro a {
  color: var(--orange, #ff4a17);
  text-decoration: underline;
  font-weight: 600;
}

.rc-category-item {
  background: var(--bg-sink, #efece5);
  border: 1.5px solid var(--line, #e0ddd5);
  border-radius: 16px;
  padding: 16px 18px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.rc-category-item:hover {
  border-color: color-mix(in srgb, var(--orange, #ff4a17) 40%, var(--line, #e0ddd5));
}

.rc-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.rc-cat-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rc-cat-title {
  font-family: var(--font-head, 'Space Grotesk', sans-serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--tx, #16181d);
  margin: 0;
}

.rc-cat-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--orange, #ff4a17) 12%, transparent);
  color: var(--orange, #ff4a17);
}

.rc-cat-desc {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--tx-2, #52504b);
  margin: 0;
}

/* ── Toggle Switch ── */
.rc-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.rc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.rc-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--line, #d0ccc3);
  border-radius: 24px;
  transition: background-color 0.25s ease;
}

.rc-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s cubic-bezier(0.25, 0.9, 0.3, 1);
}

.rc-switch input:checked + .rc-slider {
  background-color: var(--orange, #ff4a17);
}

.rc-switch input:checked + .rc-slider::before {
  transform: translateX(20px);
}

.rc-switch input:disabled + .rc-slider {
  opacity: 0.7;
  cursor: not-allowed;
  background-color: var(--orange, #ff4a17);
}

.rc-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 28px 24px;
  border-top: 1px solid var(--line, #e0ddd5);
}

/* ── Responzivita ── */
@media (max-width: 820px) {
  .rc-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .rc-banner-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .rc-banner-actions .rc-btn {
    flex: 1;
    min-width: 120px;
  }

  .rc-banner-actions .rc-btn-link {
    flex-basis: 100%;
    text-align: center;
    padding: 8px 12px;
  }
}

@media (max-width: 540px) {
  #robotuj-cookie-banner {
    bottom: 12px;
    left: 12px;
    right: 12px;
    padding: 18px;
    border-radius: 18px;
  }

  .rc-banner-title {
    font-size: 1rem;
  }

  .rc-banner-text {
    font-size: 0.82rem;
  }

  .rc-modal-card {
    padding: 0;
    border-radius: 20px;
  }

  .rc-modal-header {
    padding: 18px 20px;
  }

  .rc-modal-body {
    padding: 16px 20px;
  }

  .rc-modal-footer {
    padding: 16px 20px 20px;
    flex-direction: column-reverse;
  }

  .rc-modal-footer .rc-btn {
    width: 100%;
  }
}
