/* ============================================================
   Hours — Cookie Consent CMP v2 styles (Flatpay-style centreret modal)
   ============================================================ */

#hours-consent-modal,
#hours-consent-cog,
#hours-consent-modal * {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

.hc-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ----- Backdrop ----- */
.hc-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 17, 18, .55);
  z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: hc-fade .25s ease;
}
@keyframes hc-fade { from { opacity: 0; } to { opacity: 1; } }

/* ----- Modal card ----- */
.hc-card {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 64px -16px rgba(0,0,0,.3);
  animation: hc-pop .3s cubic-bezier(.2,.8,.2,1);
  color: var(--t1, #1a1a1a);
  font-family: inherit;
}
@keyframes hc-pop {
  from { transform: translateY(20px) scale(.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ----- Header ----- */
.hc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 26px;
  border-bottom: 1px solid var(--border, #e8e5e0);
  background: #fff;
}
.hc-brand {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.hc-brand-logo {
  height: 22px; width: auto; display: block;
}
.hc-brand-text {
  font-family: var(--display, inherit);
  font-size: .92rem;
  font-weight: 600;
  color: var(--t1, #1a1a1a);
  letter-spacing: -.01em;
}

/* ----- Language dropdown ----- */
.hc-lang-wrap { position: relative; }
.hc-lang-btn {
  background: transparent;
  border: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--t2, #555);
  transition: background .15s ease, color .15s ease;
}
.hc-lang-btn:hover {
  background: var(--subtle, #f0efec);
  color: var(--t1, #1a1a1a);
}
.hc-lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border, #e8e5e0);
  border-radius: 10px;
  box-shadow: 0 16px 32px -8px rgba(0,0,0,.18);
  padding: 4px;
  min-width: 140px;
  z-index: 1;
  display: flex; flex-direction: column;
}
.hc-lang-option {
  background: transparent;
  border: 0;
  padding: 9px 14px;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  font-size: .85rem;
  color: var(--t1, #1a1a1a);
  font-family: inherit;
}
.hc-lang-option:hover { background: var(--subtle, #f0efec); }
.hc-lang-option.is-active {
  font-weight: 600;
  color: var(--green-txt, #0e6640);
}

/* ----- Tabs ----- */
.hc-tabs {
  display: flex;
  border-bottom: 1px solid var(--border, #e8e5e0);
  padding: 0 26px;
  background: #fff;
}
.hc-tab {
  background: transparent;
  border: 0;
  padding: 16px 18px;
  cursor: pointer;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  color: var(--t2, #555);
  position: relative;
  transition: color .15s ease;
}
.hc-tab:hover { color: var(--t1, #1a1a1a); }
.hc-tab.is-active {
  color: var(--t1, #1a1a1a);
  font-weight: 600;
}
.hc-tab.is-active::after {
  content: '';
  position: absolute;
  left: 18px; right: 18px;
  bottom: -1px;
  height: 2px;
  background: var(--t1, #1a1a1a);
  border-radius: 1px;
}

/* ----- Body ----- */
.hc-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px;
}
.hc-body::-webkit-scrollbar { width: 8px; }
.hc-body::-webkit-scrollbar-thumb {
  background: #d4d2cc;
  border-radius: 4px;
}

.hc-intro {
  font-size: .85rem;
  color: var(--t2, #555);
  line-height: 1.6;
  margin: 0 0 18px;
}

/* ----- Consent tab — category list ----- */
.hc-cat-list { display: flex; flex-direction: column; gap: 4px; }
.hc-cat-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border, #e8e5e0);
}
.hc-cat-row:last-child { border-bottom: 0; }
.hc-cat-text { flex: 1; min-width: 0; }
.hc-cat-text strong {
  display: block;
  font-size: .92rem;
  font-weight: 600;
  color: var(--t1, #1a1a1a);
  margin-bottom: 4px;
}
.hc-cat-text p {
  font-size: .8rem;
  color: var(--t2, #555);
  line-height: 1.55;
  margin: 0;
}

/* ----- Toggle switch ----- */
.hc-switch {
  position: relative;
  width: 44px; height: 26px;
  display: inline-block;
  flex-shrink: 0;
  cursor: pointer;
}
.hc-switch input {
  opacity: 0; width: 0; height: 0; position: absolute;
}
.hc-switch-slider {
  position: absolute; inset: 0;
  background: #c7c4be;
  border-radius: 999px;
  transition: background .15s ease;
  cursor: pointer;
}
.hc-switch-slider::before {
  content: '';
  position: absolute;
  height: 20px; width: 20px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  transition: transform .15s ease;
}
.hc-switch input:checked + .hc-switch-slider { background: var(--green, #1f9d55); }
.hc-switch input:checked + .hc-switch-slider::before { transform: translateX(18px); }
.hc-switch input:disabled + .hc-switch-slider { opacity: .55; cursor: not-allowed; }

/* ----- Details tab — declaration tables ----- */
.hc-details { display: flex; flex-direction: column; gap: 24px; }
.hc-cat-section h4 {
  font-size: .92rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--t1, #1a1a1a);
}
.hc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
}
.hc-table th {
  text-align: left;
  background: var(--subtle, #f0efec);
  color: var(--t1, #1a1a1a);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border, #e8e5e0);
}
.hc-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border, #e8e5e0);
  color: var(--t2, #555);
  vertical-align: top;
}
.hc-table td strong { color: var(--t1, #1a1a1a); }
.hc-empty {
  font-size: .8rem;
  color: var(--t3, #888);
  font-style: italic;
  margin: 0;
}

/* ----- About tab ----- */
.hc-about-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--t1, #1a1a1a);
}
.hc-links {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 14px;
}
.hc-links a {
  font-size: .85rem;
  font-weight: 600;
  color: var(--green-txt, #0e6640);
  text-decoration: underline;
}

/* ----- Footer buttons ----- */
.hc-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 16px 26px 20px;
  border-top: 1px solid var(--border, #e8e5e0);
  background: #fff;
}
.hc-btn {
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
  text-align: center;
  white-space: nowrap;
}
.hc-btn--dark {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}
.hc-btn--dark:hover { background: #2a2a2a; border-color: #2a2a2a; }
.hc-btn--ghost {
  background: var(--subtle, #f0efec);
  color: var(--t1, #1a1a1a);
  border-color: var(--subtle, #f0efec);
}
.hc-btn--ghost:hover { background: #e5e3de; border-color: #e5e3de; }

/* ----- Floating cog (kun før samtykke) ----- */
#hours-consent-cog {
  position: fixed;
  left: 14px; bottom: 14px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--t1, #1a1a1a);
  border: 1px solid var(--border, #e8e5e0);
  box-shadow: 0 6px 16px -4px rgba(0,0,0,.15);
  cursor: pointer;
  z-index: 99997;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s ease;
}
#hours-consent-cog:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -6px rgba(0,0,0,.2);
  color: var(--green, #1f9d55);
}

/* ----- Responsive ----- */
@media (max-width: 640px) {
  .hc-backdrop { padding: 0; align-items: flex-end; }
  .hc-card {
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
    max-width: 100%;
  }
  .hc-header { padding: 14px 18px; }
  .hc-tabs { padding: 0 18px; overflow-x: auto; }
  .hc-tab { padding: 14px 12px; font-size: .85rem; }
  .hc-tab.is-active::after { left: 12px; right: 12px; }
  .hc-body { padding: 18px 18px; }
  .hc-footer {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 18px 18px;
  }
  .hc-btn { padding: 12px 14px; }
  .hc-table { font-size: .72rem; }
  .hc-table th, .hc-table td { padding: 6px 8px; }
}
