@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&display=swap');

/* === ThermoPro paleta === */
:root {
  --tp-red: #E2231A;
  --tp-red-dark: #B81B14;
  --tp-ink: #1a1a1a;
  --tp-muted: #6b6b6b;
  --tp-line: #e6e6e6;
}

.tp-cookie-banner,
.tp-cookie-modal-overlay,
.tp-manage-button {
  font-family: 'Manrope', -apple-system, sans-serif;
  box-sizing: border-box;
}

.tp-cookie-banner *,
.tp-cookie-modal-overlay *,
.tp-manage-button * {
  box-sizing: border-box;
}

.tp-cookie-banner[hidden],
.tp-cookie-modal-overlay[hidden],
.tp-manage-button[hidden] {
  display: none !important;
}

/* --- BANNER --- */
.tp-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #ffffff;
  color: var(--tp-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  gap: 20px;
  z-index: 2147483647 !important;
  font-size: 13px;
  line-height: 1.5;
  border-top: 4px solid var(--tp-red);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.12);
  isolation: isolate;
  transform: translateZ(0);
}

.tp-banner-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.tp-banner-logo img {
  display: block;
  height: 34px;
  width: auto;
}

.tp-banner-text {
  flex: 1;
}

.tp-link {
  color: var(--tp-red);
  font-weight: 600;
  text-decoration: underline;
  margin-left: 4px;
}

.tp-link:hover {
  text-decoration: none;
}

.tp-banner-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* --- TLAČÍTKA --- */
.tp-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.tp-btn-outline {
  background-color: transparent;
  color: var(--tp-red);
  border: 2px solid var(--tp-red);
}

.tp-btn-outline:hover {
  background-color: rgba(226, 35, 26, 0.08);
}

.tp-btn-solid {
  background-color: var(--tp-red);
  color: #ffffff;
  border: 2px solid var(--tp-red);
}

.tp-btn-solid:hover {
  background-color: var(--tp-red-dark);
  border-color: var(--tp-red-dark);
}

/* --- MODÁLNÍ OKNO --- */
.tp-cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2147483647 !important;
  padding: 20px;
  isolation: isolate;
  transform: translateZ(0);
}

.tp-cookie-modal {
  background-color: #ffffff;
  color: var(--tp-ink);
  width: 100%;
  max-width: 700px;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--tp-red);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.tp-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px 16px;
}

.tp-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--tp-ink);
}

.tp-close-btn {
  background: transparent;
  border: none;
  color: var(--tp-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tp-close-btn:hover {
  color: var(--tp-red);
}

.tp-modal-body {
  padding: 0 32px;
  overflow-y: auto;
  font-size: 14px;
  flex: 1 1 auto;
  min-height: 0;
}

.tp-modal-intro {
  margin: 0 0 24px 0;
  line-height: 1.5;
  color: var(--tp-muted);
}

.tp-cookie-option {
  margin-bottom: 24px;
}

.tp-cookie-option strong {
  color: var(--tp-ink);
}

.tp-cookie-option p {
  margin: 8px 0 0 32px;
  color: var(--tp-muted);
  line-height: 1.5;
  font-size: 13px;
}

/* --- CHECKBOXY (ThermoPro červené) --- */
.tp-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
  user-select: none;
  position: relative;
}

.tp-checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.tp-checkbox-custom {
  height: 20px;
  width: 20px;
  background-color: #ffffff;
  border: 2px solid #c9c9c9;
  border-radius: 4px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.tp-checkbox-label input:checked ~ .tp-checkbox-custom {
  background-color: var(--tp-red);
  border-color: var(--tp-red);
}

.tp-checkbox-custom:after {
  content: "";
  display: none;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.tp-checkbox-label input:checked ~ .tp-checkbox-custom:after {
  display: block;
}

.tp-checkbox-label input:disabled ~ .tp-checkbox-custom {
  cursor: not-allowed;
  opacity: 0.5;
}

.tp-modal-footer {
  padding: 24px 32px;
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--tp-line);
}

/* --- TLAČÍTKO PRO SPRÁVU --- */
.tp-manage-button {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 999998;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--tp-red);
  border: none;
  border-radius: 50%;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(226, 35, 26, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.tp-manage-button:hover {
  background: var(--tp-red-dark);
  transform: scale(1.08);
}

.tp-manage-button svg {
  width: 20px;
  height: 20px;
  opacity: 0.95;
  transition: opacity 0.3s ease;
}

.tp-manage-button:hover svg {
  opacity: 1;
}

.tp-manage-button:focus {
  outline: none;
}

/* Pomocná třída pro snížení vrstvy plovoucího tlačítka */
.tpcb_lowered_buy_button {
  z-index: 2147482000 !important;
}

/* --- RESPONSIVITA PRO MOBILY --- */
@media (max-width: 768px) {
  .tp-cookie-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .tp-banner-logo {
    justify-content: center;
  }

  .tp-banner-actions,
  .tp-modal-footer {
    flex-direction: column;
  }

  .tp-btn {
    width: 100%;
  }

  .tp-cookie-modal-overlay {
    padding: 12px;
  }

  .tp-modal-header {
    padding: 20px 20px 12px;
  }

  .tp-modal-body {
    padding: 0 20px;
  }

  .tp-modal-footer {
    padding: 16px 20px;
    gap: 10px;
  }
}

/* Bezpečnost pro Divi Visual Builder a WordPress admin bar */
body.et-fb .tp-cookie-banner,
body.et-fb .tp-cookie-modal-overlay,
body.et-fb .tp-manage-button,
body.et_builder_inner_content .tp-cookie-banner,
body.et_builder_inner_content .tp-cookie-modal-overlay,
body.et_builder_inner_content .tp-manage-button {
  display: none !important;
}
