/* Floating Opening Hours Message - CSS v4.0 */

/* == 1. Floating Banner Styles == */
#floating-hours-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2c3e50; /* Dark Blue */
    color: #ecf0f1; /* Light Gray */
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    min-width: 250px;
    max-width: 320px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

#floating-hours-banner.fohm-banner-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Initially hide the banner, JS will unhide it */
#floating-hours-banner.fohm-banner-hidden {
    display: none;
}

#floating-hours-banner .fohm-message {
    color: #fff;
}

#floating-hours-banner .fohm-countdown {
    color: #3498db; /* Bright Blue */
}

.fohm-close-button {
    position: absolute;
    top: 5px;
    right: 8px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: none; /* Hidden by default */
    font-weight: bold;
}

/* == 2. Shortcode Instance Styles == */
/* Target dynamic instances that are NOT the floating banner */
.fohm-dynamic-instance:not(#floating-hours-banner) {
    background-color: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    margin: 1em 0;
}

.fohm-dynamic-instance:not(#floating-hours-banner) .fohm-message {
    color: #333; /* Dark text for light background */
}

.fohm-dynamic-instance:not(#floating-hours-banner) .fohm-countdown {
    color: #005a9c; /* Darker blue for light background */
}


/* == 3. General Shared Styles == */
.fohm-dynamic-instance {
     font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.fohm-message {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.fohm-countdown {
    font-size: 14px;
    font-weight: 500;
}


/* == 4. Mobile Specific == */
@media (max-width: 768px) {
    #floating-hours-banner {
        /* Raise banner on mobile to avoid overlapping other UI elements */
        bottom: 60px; 
    }
    .fohm-close-button {
        display: block; /* Show close button on mobile */
    }
}
/* ===== Shortcode layout fix (clean) ===== */

/* 1) Make shortcode box more structured */
.fohm-dynamic-instance:not(#floating-hours-banner) {
    background-color: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 16px 18px;
    max-width: 750px;
    margin: 1em 0;

    /* layout */
    display: grid;
    gap: 8px;
}

/* 2) Reset margins + improve readability */
.fohm-dynamic-instance:not(#floating-hours-banner) .fohm-message,
.fohm-dynamic-instance:not(#floating-hours-banner) .fohm-countdown {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.35;
}

/* 3) Message text */
.fohm-dynamic-instance:not(#floating-hours-banner) .fohm-message {
    color: #222;
    font-size: 16px;
    font-weight: 650;
    letter-spacing: 0.2px;
}

/* 4) Countdown row (ur-tekst) */
.fohm-dynamic-instance:not(#floating-hours-banner) .fohm-countdown {
    color: #005a9c;
    font-size: 14px;
    font-weight: 600;

    /* make it look like a neat "status row" */
    display: flex;
    align-items: center;
    gap: 8px;

    /* if long text wraps, keep it tidy */
    flex-wrap: wrap;
}

/* Optional: add a small "clock dot" before countdown for visual separation */
.fohm-dynamic-instance:not(#floating-hours-banner) .fohm-countdown::before {
    content: "⏱";
    font-size: 18px;
    line-height: 1;
    opacity: 0.85;
}

/* 5) Shared text safety (prevents ugly breaks) */
.fohm-dynamic-instance .fohm-message,
.fohm-dynamic-instance .fohm-countdown {
    word-break: normal;
    overflow-wrap: anywhere; /* avoids overflow on long strings */
}

/* ===== Floating banner small tidy too (optional but nice) ===== */
#floating-hours-banner .fohm-message,
#floating-hours-banner .fohm-countdown {
    margin: 0;
    line-height: 1.35;
}

#floating-hours-banner {
    padding-top: 14px; /* gives breathing room for close button */
}
/* === Force message above countdown (left aligned) === */
.fohm-dynamic-instance:not(#floating-hours-banner) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Message on top */
.fohm-dynamic-instance:not(#floating-hours-banner) .fohm-message {
    order: 1;
    width: 100%;
    text-align: left;
}

/* Countdown (ur) under */
.fohm-dynamic-instance:not(#floating-hours-banner) .fohm-countdown {
    order: 2;
    width: 100%;
    justify-content: flex-start;
    text-align: left;
}
/* ===== FOHM PRO PACK ===== */

/* Smooth fade on message changes */
.fohm-message {
  transition: opacity .25s ease;
}
.fohm-message.is-fading {
  opacity: 0;
}

/* Badge */
.fohm-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0 0 8px 0;
  user-select: none;
}

.fohm-badge.open { background: rgba(46, 204, 113, 0.15); }
.fohm-badge.closingSoon { background: rgba(241, 196, 15, 0.18); }
.fohm-badge.openingSoon { background: rgba(52, 152, 219, 0.15); }
.fohm-badge.closed { background: rgba(231, 76, 60, 0.12); }

/* Main text */
.fohm-text {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
  margin: 0;
}

/* Meta line (day/date) */
.fohm-meta {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 6px;
  line-height: 1.2;
}

/* Read more button */
.fohm-toggle {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  opacity: .85;
}
.fohm-toggle:hover { opacity: 1; }

/* Countdown: tabular numbers (pro timer look) */
.fohm-countdown {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  line-height: 1.3;
}

/* Make shortcode layout neat (message above countdown, left aligned) */
.fohm-dynamic-instance:not(#floating-hours-banner) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.fohm-dynamic-instance:not(#floating-hours-banner) .fohm-message,
.fohm-dynamic-instance:not(#floating-hours-banner) .fohm-countdown {
  width: 100%;
  margin: 0 !important;
}

/* Optional: give banner a tiny bit more breathing room */
#floating-hours-banner { padding-top: 14px; }
#floating-hours-banner .fohm-message, 
#floating-hours-banner .fohm-countdown { margin: 0; }
/* ===== FOHM TYPO POLISH (11) ===== */

/* Badge: mere “designet” */
.fohm-badge{
  letter-spacing: .7px;
  font-size: 16px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Teksten: rolig og letlæst */
.fohm-text{
  font-size: 16px;
  font-weight: 650;
  line-height: 1.38;
  margin: 0;
}

/* Meta: diskret, men tydelig */
.fohm-meta{
  font-size: 12px;
  opacity: .72;
  line-height: 1.25;
  margin-top: 6px;
}

/* Countdown: pro “timer-look” */
.fohm-countdown{
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: .2px;
  font-weight: 600;
}

/* Små margin-resets så tema ikke roder */
#floating-hours-banner .fohm-message,
#floating-hours-banner .fohm-countdown,
.fohm-dynamic-instance:not(#floating-hours-banner) .fohm-message,
.fohm-dynamic-instance:not(#floating-hours-banner) .fohm-countdown{
  margin: 0 !important;
}
