.haamy-banner, .haamy-banner *,
.haamy-notice, .haamy-notice *,
.haamy-popup-card, .haamy-popup-card * { box-sizing: border-box; }
.haamy-banner[hidden] { display: none !important; }

.haamy-banner {
  display: block; position: relative; float: none; clear: both;
  width: 100%; max-width: 100%; margin: 0; padding: 0;
  background: var(--haamy-bg, #c7a339); color: var(--haamy-fg, #1c1a17);
  border-bottom: 3px solid var(--haamy-edge, rgba(0,0,0,.25));
  font-family: inherit; font-size: 15px; line-height: 1.35;
  text-align: left; overflow: hidden; isolation: isolate;
}

/* Blagi sjaj u gornjem lijevom kutu, daje traci dubinu. */
.haamy-banner::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 190% at 12% -20%, var(--haamy-glow, rgba(255,255,255,.16)), var(--haamy-glow0, rgba(255,255,255,0)) 62%);
}
/* Svjetlosni prelazak s lijeva na desno. */
.haamy-banner::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; z-index: 0; pointer-events: none;
  background: linear-gradient(100deg, var(--haamy-glow0, rgba(255,255,255,0)), var(--haamy-glow, rgba(255,255,255,.16)), var(--haamy-glow0, rgba(255,255,255,0)));
  will-change: transform; animation: haamy-sweep 7s linear infinite;
}
@keyframes haamy-sweep { 0% { transform: translateX(-115%); } 60%, 100% { transform: translateX(265%); } }

.haamy-banner .haamy-inner {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 26px; width: 100%; max-width: 1240px; min-width: 0;
  margin: 0 auto; padding: 14px 22px;
}

.haamy-banner .haamy-copy {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  flex: 1 1 300px; min-width: 0; margin: 0; padding: 0;
}
.haamy-kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  opacity: .82; white-space: nowrap;
}
.haamy-dot {
  display: block; width: 7px; height: 7px; flex: 0 0 auto;
  border-radius: 50%; background: currentColor;
  animation: haamy-pulse 1.9s ease-in-out infinite;
}
@keyframes haamy-pulse { 0%, 100% { opacity: .3; transform: scale(.75); } 50% { opacity: 1; transform: scale(1.15); } }
.haamy-banner .haamy-text {
  display: block; font-size: 17px; font-weight: 800; line-height: 1.3;
  letter-spacing: -.005em; overflow-wrap: anywhere;
}
.haamy-banner .haamy-mobile-copy { display: none; }

.haamy-banner .haamy-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  flex: 0 1 auto; gap: 10px 16px; min-width: 0;
}
.haamy-clock {
  display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: stretch; justify-content: center;
  gap: 7px; max-width: 100%; margin: 0; padding: 0; list-style: none;
}
.haamy-unit {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 46px; padding: 6px 8px; margin: 0;
  background: var(--haamy-chip, rgba(0,0,0,.12));
  border: 1px solid var(--haamy-chip-edge, rgba(0,0,0,.28)); border-radius: 7px;
}
.haamy-unit b {
  display: block; margin: 0; padding: 0; color: inherit; font: inherit; font-weight: 800;
  font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.haamy-unit small {
  display: block; color: inherit; font: inherit; font-size: 9px; line-height: 1;
  letter-spacing: .09em; text-transform: uppercase; opacity: .72; margin-top: 4px;
}

a.haamy-button,
a.haamy-button:visited {
  position: relative; display: inline-flex; flex: 0 1 auto;
  align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; min-width: 0; max-width: 100%; padding: 11px 22px; margin: 0;
  border: 0; border-radius: 999px;
  background: var(--haamy-fg, #1c1a17); color: var(--haamy-bg, #c7a339);
  font: inherit; font-weight: 800; font-size: 15px; line-height: 1.2; letter-spacing: normal;
  text-decoration: none; text-transform: none; white-space: normal; overflow-wrap: anywhere;
  box-shadow: 0 6px 18px var(--haamy-shadow, rgba(0,0,0,.28));
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease;
}
a.haamy-button::after {
  content: "\2192"; display: inline-block; font-size: 17px; line-height: 1;
  transition: transform .18s ease;
}
a.haamy-button:hover {
  text-decoration: none; transform: translateY(-2px);
  box-shadow: 0 11px 26px var(--haamy-shadow, rgba(0,0,0,.28));
}
a.haamy-button:hover::after { transform: translateX(4px); }
a.haamy-button:active { transform: translateY(0); }
a.haamy-button:focus-visible { outline: 3px solid var(--haamy-fg, #1c1a17); outline-offset: 3px; }

/* Mobilni raspored: tekst u sredini, sat u redu, gumb preko cijele sirine. */
@media (max-width: 700px) {
  .haamy-banner .haamy-inner { flex-direction: column; justify-content: center; gap: 11px; padding: 13px 14px; }
  .haamy-banner .haamy-copy { flex: 1 1 100%; align-items: center; text-align: center; width: 100%; }
  .haamy-banner .haamy-text { font-size: 15px; }
  .haamy-banner .haamy-desktop-copy { display: none; }
  .haamy-banner .haamy-mobile-copy { display: inline; }
  .haamy-banner .haamy-actions { width: 100%; flex-direction: column; justify-content: center; gap: 11px; }
  .haamy-banner .haamy-clock { gap: 5px; }
  .haamy-banner .haamy-unit { min-width: 40px; padding: 5px 6px; }
  .haamy-banner .haamy-unit b { font-size: 17px; }
  .haamy-banner a.haamy-button { width: 100%; font-size: 15px; padding: 11px 16px; }
}
.haamy-banner.haamy-phone .haamy-inner { flex-direction: column; justify-content: center; gap: 11px; padding: 13px 14px; }
.haamy-banner.haamy-phone .haamy-copy { flex: 1 1 100%; align-items: center; text-align: center; width: 100%; }
.haamy-banner.haamy-phone .haamy-text { font-size: 15px; }
.haamy-banner.haamy-phone .haamy-desktop-copy { display: none; }
.haamy-banner.haamy-phone .haamy-mobile-copy { display: inline; }
.haamy-banner.haamy-phone .haamy-actions { width: 100%; flex-direction: column; justify-content: center; gap: 11px; }
.haamy-banner.haamy-phone .haamy-clock { gap: 5px; }
.haamy-banner.haamy-phone .haamy-unit { min-width: 40px; padding: 5px 6px; }
.haamy-banner.haamy-phone .haamy-unit b { font-size: 17px; }
.haamy-banner.haamy-phone a.haamy-button { width: 100%; font-size: 15px; padding: 11px 16px; }

@media (prefers-reduced-motion: reduce) {
  .haamy-banner::after { display: none; }
  .haamy-banner .haamy-dot { animation: none; opacity: .9; }
  .haamy-banner a.haamy-button { transition: none; }
  .haamy-banner a.haamy-button:hover { transform: none; }
  .haamy-banner a.haamy-button::after { transition: none; }
}
@media print { .haamy-banner { display: none !important; } }

/* Stranica postavki */
.haamy-settings { max-width: 1100px; }
.haamy-settings .haamy-preview-wide { width: 100%; margin-top: 12px; }
.haamy-settings .haamy-preview-phone { width: 360px; max-width: 100%; border: 1px solid #c3c4c7; }
.haamy-settings input[type="datetime-local"] { max-width: 100%; }
.haamy-settings .haamy-contrast { display: inline-block; margin-top: 8px; padding: 3px 9px; border-radius: 3px; font-weight: 600; }
.haamy-settings .haamy-contrast.is-good { background: #edfaef; color: #14622a; }
.haamy-settings .haamy-contrast.is-weak { background: #fcf3e3; color: #7a4b06; }
.haamy-settings .haamy-contrast.is-bad { background: #fdeceb; color: #8a1f16; }

/* ---------- Popup ---------- */
.haamy-popup[hidden] { display: none !important; }
.haamy-popup {
  position: fixed; inset: 0; z-index: 99998;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(12, 11, 10, .55);
  opacity: 0; transition: opacity .22s ease;
}
.haamy-popup.is-open { opacity: 1; }

.haamy-popup-card {
  position: relative; width: 100%; max-width: 460px; margin: 0;
  padding: 30px 28px 24px; border-radius: 16px;
  background: var(--haamy-bg, #c7a339); color: var(--haamy-fg, #1c1a17);
  border-bottom: 4px solid var(--haamy-edge, rgba(0,0,0,.25));
  box-shadow: 0 24px 60px rgba(0, 0, 0, .38);
  font-family: inherit; text-align: center; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  transform: translateY(14px) scale(.97); transition: transform .24s ease;
}
.haamy-popup.is-open .haamy-popup-card { transform: translateY(0) scale(1); }
.haamy-popup-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(90% 70% at 50% -10%, var(--haamy-glow, rgba(255,255,255,.22)), var(--haamy-glow0, rgba(255,255,255,0)) 65%);
}
.haamy-popup-card > * { position: relative; z-index: 1; }

.haamy-popup-title {
  margin: 0; font-size: 24px; font-weight: 800; line-height: 1.25;
  letter-spacing: -.01em; overflow-wrap: anywhere;
}
.haamy-popup-body { margin: 0; font-size: 15px; line-height: 1.55; opacity: .88; overflow-wrap: anywhere; }
.haamy-popup-card .haamy-clock { margin: 2px 0; }
.haamy-popup-card a.haamy-button { width: 100%; margin-top: 4px; font-size: 16px; }

.haamy-popup-close {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  width: 34px; height: 34px; padding: 0; margin: 0;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 50%;
  color: inherit; font-family: inherit; font-size: 26px; line-height: 1;
  opacity: .6; cursor: pointer; transition: opacity .15s ease, background .15s ease;
}
.haamy-popup-close:hover { opacity: 1; background: var(--haamy-chip, rgba(0,0,0,.12)); }
.haamy-popup-close:focus-visible { outline: 2px solid var(--haamy-fg, #1c1a17); outline-offset: 2px; opacity: 1; }
.haamy-popup-later {
  padding: 4px 6px; margin: 0; background: none; border: 0;
  color: inherit; font-family: inherit; font-size: 13px; line-height: 1.4;
  text-decoration: underline; opacity: .7; cursor: pointer;
}
.haamy-popup-later:hover { opacity: 1; }
.haamy-popup-later:focus-visible { outline: 2px solid var(--haamy-fg, #1c1a17); outline-offset: 2px; opacity: 1; }

/* Na uskim zaslonima popup dolazi kao kartica pri dnu, ne preko cijelog ekrana. */
@media (max-width: 600px) {
  .haamy-popup { align-items: flex-end; padding: 0; }
  .haamy-popup-card {
    max-width: 100%; padding: 26px 20px 20px;
    border-radius: 18px 18px 0 0; border-bottom: 0;
    transform: translateY(100%); transition: transform .26s ease;
  }
  .haamy-popup.is-open .haamy-popup-card { transform: translateY(0); }
  .haamy-popup-title { font-size: 20px; }
  .haamy-popup-body { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .haamy-popup, .haamy-popup-card { transition: none; }
  .haamy-popup-card { transform: none; }
}
@media print { .haamy-popup { display: none !important; } }

.haamy-settings .haamy-preview-card { margin-top: 12px; padding: 20px; background: #f0f0f1; border: 1px solid #c3c4c7; }
.haamy-settings .haamy-preview-card .haamy-popup-card { transform: none; margin: 0 auto; }

/* ---------- Wichtige Mitteilung ---------- */
.haamy-notice {
  display: block; position: relative; width: 100%; margin: 0; padding: 0;
  background: var(--haamy-bg, #1c1a17); color: var(--haamy-fg, #e6d5b8);
  border-bottom: 1px solid var(--haamy-chip-edge, rgba(255,255,255,.25));
  font-family: inherit; font-size: 15px; line-height: 1.4; text-align: left;
}
.haamy-notice .haamy-notice-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px 12px; width: 100%; max-width: 1240px; min-width: 0;
  margin: 0 auto; padding: 11px 20px;
}
.haamy-notice .haamy-notice-mark {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--haamy-fg, #e6d5b8); color: var(--haamy-bg, #1c1a17);
  font-size: 14px; font-weight: 800; line-height: 1;
}
.haamy-notice .haamy-notice-text { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.haamy-notice a.haamy-notice-link,
.haamy-notice a.haamy-notice-link:visited {
  color: inherit; font-weight: 700; text-decoration: underline;
  text-underline-offset: 3px; white-space: nowrap;
}
.haamy-notice a.haamy-notice-link:hover { text-decoration-thickness: 2px; }
.haamy-notice a.haamy-notice-link:focus-visible { outline: 2px solid var(--haamy-fg, #e6d5b8); outline-offset: 3px; }
@media (max-width: 600px) {
  .haamy-notice { font-size: 14px; }
  .haamy-notice .haamy-notice-inner { padding: 10px 14px; gap: 5px 9px; }
  .haamy-notice a.haamy-notice-link { white-space: normal; }
}
.haamy-notice.haamy-phone { font-size: 14px; }
.haamy-notice.haamy-phone .haamy-notice-inner { padding: 10px 14px; gap: 5px 9px; }
.haamy-notice.haamy-phone a.haamy-notice-link { white-space: normal; }
@media print { .haamy-notice { display: none !important; } }

/* ---------- Status na stranicama postavki ---------- */
.haamy-settings .haamy-status {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  margin: 14px 0 10px; padding: 10px 14px;
  background: #fff; border: 1px solid #c3c4c7; border-left-width: 4px; border-radius: 3px;
}
.haamy-settings.haamy-scope-notice .haamy-status { border-left-color: #1C1A17; }
.haamy-settings.haamy-scope-action .haamy-status { border-left-color: #C7A339; }
.haamy-settings .haamy-chip {
  display: inline-block; padding: 3px 10px; border-radius: 11px;
  font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.haamy-settings .haamy-chip.is-on { background: #edfaef; color: #14622a; }
.haamy-settings .haamy-chip.is-off { background: #f0f0f1; color: #50575e; }
.haamy-settings .haamy-chip.is-blocked { background: #fcf3e3; color: #7a4b06; }
.haamy-settings.haamy-scope-notice > h1 { border-bottom: 3px solid #1C1A17; padding-bottom: 6px; display: inline-block; }
.haamy-settings.haamy-scope-action > h1 { border-bottom: 3px solid #C7A339; padding-bottom: 6px; display: inline-block; }

/* ---------- Wichtige Mitteilung als Popup ---------- */
.haamy-notice-popup { padding-top: 34px; }
.haamy-notice-popup-mark {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin: 0 auto; border-radius: 50%;
  background: var(--haamy-fg, #e6d5b8); color: var(--haamy-bg, #1c1a17);
  font-size: 18px; font-weight: 800; line-height: 1;
}
.haamy-notice-popup .haamy-popup-title { margin-top: 4px; }

/* ---------- Mitteilung mit aufklappbaren Details ---------- */
.haamy-notice.haamy-has-details .haamy-notice-inner {
  display: flex; width: 100%; margin: 0 auto;
  background: none; border: 0; border-radius: 0;
  color: inherit; font: inherit; text-align: left;
  cursor: pointer; -webkit-appearance: none; appearance: none;
}
.haamy-notice.haamy-has-details .haamy-notice-inner:hover { background: var(--haamy-glow, rgba(255,255,255,.12)); }
.haamy-notice.haamy-has-details .haamy-notice-inner:focus-visible {
  outline: 2px solid var(--haamy-fg, #e6d5b8); outline-offset: -3px;
}
/* Poziv na klik stoji odmah uz tekst, ne na drugom kraju trake, i ima
   vlastitu pozadinu i okvir da se jasno vidi da je nesto klikabilno. */
.haamy-notice .haamy-notice-cta {
  display: inline-flex; align-items: center; flex: 0 0 auto; gap: 8px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--haamy-chip, rgba(255,255,255,.14));
  border: 1px solid var(--haamy-chip-edge, rgba(255,255,255,.34));
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.haamy-notice .haamy-notice-more {
  font-size: 12px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
}
.haamy-notice .haamy-chevron {
  display: block; flex: 0 0 auto; width: 8px; height: 8px; margin: -3px 1px 0 0;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .2s ease, margin .2s ease;
}
.haamy-notice .haamy-notice-inner[aria-expanded="true"] .haamy-chevron {
  transform: rotate(-135deg); margin: 3px 1px 0 0;
}
.haamy-notice.haamy-has-details .haamy-notice-inner:hover .haamy-notice-cta,
.haamy-notice.haamy-has-details .haamy-notice-inner[aria-expanded="true"] .haamy-notice-cta {
  background: var(--haamy-fg, #e6d5b8); color: var(--haamy-bg, #1c1a17);
  border-color: var(--haamy-fg, #e6d5b8);
}

.haamy-notice .haamy-notice-panel { display: block; width: 100%; }
.haamy-notice .haamy-notice-panel[hidden] { display: none; }
.haamy-notice .haamy-notice-panel-inner {
  width: 100%; max-width: 1240px; margin: 0 auto; padding: 14px 20px 16px;
  background: var(--haamy-chip, rgba(255,255,255,.12));
  border-top: 1px solid var(--haamy-chip-edge, rgba(255,255,255,.28));
}
.haamy-notice .haamy-notice-details {
  margin: 0; font-size: 14px; line-height: 1.6; opacity: .95; overflow-wrap: anywhere;
}
.haamy-notice .haamy-notice-panel-inner a.haamy-notice-link {
  display: inline-block; margin-top: 10px; white-space: normal;
}
@media (max-width: 600px) {
  .haamy-notice .haamy-notice-more { display: none; }
  .haamy-notice .haamy-notice-cta { padding: 6px 9px; }
  .haamy-notice .haamy-notice-panel-inner { padding: 12px 14px 14px; }
  .haamy-notice .haamy-notice-details { font-size: 13px; }
}
.haamy-notice.haamy-phone .haamy-notice-more { display: none; }
.haamy-notice.haamy-phone .haamy-notice-cta { padding: 6px 9px; }
.haamy-notice.haamy-phone .haamy-notice-panel-inner { padding: 12px 14px 14px; }
.haamy-notice.haamy-phone .haamy-notice-details { font-size: 13px; }
@media (prefers-reduced-motion: reduce) {
  .haamy-notice .haamy-chevron { transition: none; }
}
