/* ========== COOKIE CONSENT SYSTEM ========== */
.ph-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--havlo-dark);
  color: white;
  padding: 1.5rem;
  box-shadow: 0 -4px 20px var(--black-alpha-20);
  z-index: 10000;
  animation: slideUp 0.4s ease-out;
  display: none;
}

.ph-cookie-banner.show {
  display: block;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.ph-cookie-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.ph-cookie-text {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex: 1;
}

.ph-cookie-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.ph-cookie-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: white;
}

.ph-cookie-description {
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
  color: var(--white-alpha-90);
}

.ph-cookie-link {
  color: var(--primary-300);
  text-decoration: underline;
  font-weight: 600;
}

.ph-cookie-link:hover {
  color: var(--primary-500);
}

.ph-cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.ph-cookie-banner .btn-primary {
  background: var(--primary-500);
  color: white;
  border: none;
}

.ph-cookie-banner .btn-primary:hover {
  background: var(--primary-700);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-shadow-md);
}

.ph-cookie-banner .btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.ph-cookie-banner .btn-secondary:hover {
  background: var(--white-alpha-10);
  color: white;
}

.ph-cookie-banner .btn-primary:focus-visible,
.ph-cookie-banner .btn-secondary:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

.ph-cookie-banner .btn-settings {
  background: var(--white-alpha-10);
  color: white;
  border: 1px solid var(--white-alpha-30);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.ph-cookie-banner .btn-settings:hover {
  background: var(--white-alpha-20);
}

.ph-cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.ph-cookie-modal.show {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ph-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--black-alpha-70);
}

.ph-modal-content {
  position: relative;
  background: white;
  border-radius: 0.75rem;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px var(--black-alpha-30);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.ph-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 2px solid var(--gray-200);
}

.ph-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--havlo-dark);
  font-weight: 700;
}

.ph-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
}

.ph-modal-close:hover {
  background: var(--gray-100);
  color: var(--primary-500);
}

.ph-modal-close:focus,
.ph-modal-close:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

.ph-modal-body {
  padding: 1.5rem;
}

.ph-modal-intro {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.ph-cookie-category {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.ph-category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.ph-category-header h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  color: var(--primary-700);
  font-weight: 700;
}

.ph-category-header p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.ph-category-details {
  font-size: 0.875rem;
  color: var(--gray-700);
  line-height: 1.6;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.ph-category-details strong {
  color: var(--primary-700);
}

.ph-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

.ph-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ph-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-300);
  transition: 0.3s;
  border-radius: 26px;
}

.ph-toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.ph-toggle input:checked + .ph-toggle-slider {
  background-color: var(--success-500);
}

.ph-toggle input:checked + .ph-toggle-slider:before {
  transform: translateX(24px);
}

.ph-toggle input:disabled + .ph-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.ph-modal-footer {
  padding: 1.5rem;
  border-top: 2px solid var(--gray-200);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .ph-cookie-content {
    flex-direction: column;
    gap: 1rem;
  }

  .ph-cookie-actions {
    width: 100%;
    flex-direction: column;
  }

  .ph-cookie-actions button {
    width: 100%;
  }

  .ph-modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .ph-modal-footer {
    flex-direction: column;
  }

  .ph-modal-footer button {
    width: 100%;
  }
}
