/* GdG Praxisstatus-Demo v1.2.0
   v1.2: clearer status bar, hero CTA state logic, first-use demo hint. */

:root {
    --gdg-ps-ink: #244a5a;
    --gdg-ps-ink-soft: #506873;
    --gdg-ps-sage: #789488;
    --gdg-ps-sage-soft: #edf4f0;
    --gdg-ps-cream: #fbf9f5;
    --gdg-ps-sand: #d2aa6b;
    --gdg-ps-alert: #a35337;
    --gdg-ps-alert-soft: #fff7f3;
    --gdg-ps-border: rgba(36, 74, 90, 0.17);
    --gdg-ps-shadow: 0 16px 42px rgba(36, 74, 90, 0.10);
}

.gdg-ps-shell {
    color: var(--gdg-ps-ink);
    font-family: inherit;
    text-align: left;
}

.gdg-ps-statusbar {
    display: none;
    position: relative;
    z-index: 999;
    border-bottom: 1px solid var(--gdg-ps-border);
    box-shadow: 0 5px 18px rgba(36, 74, 90, 0.07);
}

.gdg-ps-statusbar--afterhours {
    background: var(--gdg-ps-sage-soft);
}

.gdg-ps-statusbar--vertretung {
    background: var(--gdg-ps-alert-soft);
    border-bottom-color: rgba(163, 83, 55, 0.25);
}

body[data-gdg-praxisstatus="afterhours"] .gdg-ps-statusbar--afterhours,
body[data-gdg-praxisstatus="vertretung"] .gdg-ps-statusbar--vertretung {
    display: block;
}

.gdg-ps-statusbar__inner {
    width: min(1180px, calc(100% - 48px));
    min-height: 68px;
    margin: 0 auto;
    padding: 12px 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 13px;
}

.gdg-ps-statusbar__marker {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(36, 74, 90, 0.16);
}

.gdg-ps-statusbar__marker::before {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: var(--gdg-ps-sage);
}

.gdg-ps-statusbar--vertretung .gdg-ps-statusbar__marker {
    border-color: rgba(163, 83, 55, 0.24);
}

.gdg-ps-statusbar--vertretung .gdg-ps-statusbar__marker::before {
    background: var(--gdg-ps-alert);
}

.gdg-ps-statusbar__copy {
    min-width: 0;
}

.gdg-ps-statusbar__label {
    display: block;
    margin-bottom: 2px;
    color: var(--gdg-ps-sage);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.gdg-ps-statusbar--vertretung .gdg-ps-statusbar__label {
    color: var(--gdg-ps-alert);
}

.gdg-ps-statusbar p {
    margin: 0;
    color: var(--gdg-ps-ink-soft);
    font-size: 0.94rem;
    line-height: 1.45;
}

.gdg-ps-statusbar strong {
    color: var(--gdg-ps-ink);
    font-weight: 800;
}

.gdg-ps-statusbar__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 13px;
    border-radius: 8px;
    background: var(--gdg-ps-ink);
    color: #ffffff !important;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
}

.gdg-ps-statusbar--vertretung .gdg-ps-statusbar__action {
    background: var(--gdg-ps-alert);
}

.gdg-ps-statusbar__action:hover,
.gdg-ps-statusbar__action:focus-visible {
    filter: brightness(0.92);
    outline: 2px solid rgba(36, 74, 90, 0.35);
    outline-offset: 2px;
}

/* The practice page stays calm in normal operation. */
.gdg-ps-demo-trigger {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 10000;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 999px;
    background: var(--gdg-ps-ink);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(36, 74, 90, 0.25);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.gdg-ps-demo-trigger:hover,
.gdg-ps-demo-trigger:focus-visible {
    background: #173945;
    box-shadow: 0 16px 34px rgba(36, 74, 90, 0.34);
    outline: none;
    transform: translateY(-2px);
}

.gdg-ps-demo-trigger__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d5b577;
    box-shadow: 0 0 0 3px rgba(213, 181, 119, 0.18);
}

.gdg-ps-demo-coachmark {
    position: fixed;
    right: 22px;
    bottom: 76px;
    z-index: 9999;
    width: min(250px, calc(100vw - 38px));
    padding: 12px 14px;
    border: 1px solid rgba(36, 74, 90, 0.13);
    border-radius: 12px;
    background: #ffffff;
    color: var(--gdg-ps-ink);
    box-shadow: 0 14px 34px rgba(36, 74, 90, 0.16);
    text-align: left;
}

.gdg-ps-demo-coachmark::after {
    content: "";
    position: absolute;
    right: 36px;
    bottom: -6px;
    width: 11px;
    height: 11px;
    border-right: 1px solid rgba(36, 74, 90, 0.13);
    border-bottom: 1px solid rgba(36, 74, 90, 0.13);
    background: #ffffff;
    transform: rotate(45deg);
}

.gdg-ps-demo-coachmark[hidden] {
    display: none;
}

.gdg-ps-demo-coachmark strong {
    display: block;
    margin-bottom: 3px;
    font-size: 0.82rem;
    line-height: 1.2;
}

.gdg-ps-demo-coachmark span {
    display: block;
    color: var(--gdg-ps-ink-soft);
    font-size: 0.77rem;
    line-height: 1.4;
}

.gdg-ps-demo-panel {
    position: fixed;
    right: 22px;
    bottom: 76px;
    z-index: 10001;
    width: min(370px, calc(100vw - 32px));
    padding: 20px;
    border: 1px solid rgba(36, 74, 90, 0.13);
    border-radius: 16px;
    background: #ffffff;
    color: var(--gdg-ps-ink);
    box-shadow: 0 20px 58px rgba(36, 74, 90, 0.22);
    text-align: left;
}

.gdg-ps-demo-panel[hidden] {
    display: none;
}

.gdg-ps-demo-panel__head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.gdg-ps-demo-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: #f2f5f4;
    color: var(--gdg-ps-ink);
    cursor: pointer;
    font-size: 21px;
    line-height: 1;
}

.gdg-ps-kicker,
.gdg-ps-eyebrow {
    display: block;
    color: var(--gdg-ps-sage);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.3;
    text-transform: uppercase;
}

.gdg-ps-demo-panel h2 {
    max-width: 280px;
    margin: 6px 0 8px;
    color: var(--gdg-ps-ink);
    font-size: 1.25rem;
    line-height: 1.25;
}

.gdg-ps-demo-panel p {
    margin: 0;
    color: var(--gdg-ps-ink-soft);
    font-size: 0.88rem;
    line-height: 1.55;
}

.gdg-ps-demo-options {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.gdg-ps-demo-options button {
    width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid var(--gdg-ps-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--gdg-ps-ink);
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: left;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.gdg-ps-demo-options button:hover,
.gdg-ps-demo-options button:focus-visible {
    border-color: var(--gdg-ps-sage);
    background: var(--gdg-ps-sage-soft);
    outline: none;
}

.gdg-ps-demo-options button[aria-pressed="true"] {
    border-color: var(--gdg-ps-ink);
    background: var(--gdg-ps-ink);
    color: #ffffff;
}

.gdg-ps-demo-footnote {
    margin-top: 13px !important;
    color: #788b92 !important;
    font-size: 0.76rem !important;
}

/* Only the first primary booking CTA in the main content is updated by JavaScript. */
#et-main-area .gdg-ps-hero-cta,
#main-content .gdg-ps-hero-cta,
main .gdg-ps-hero-cta {
    max-width: min(350px, 100%);
    white-space: normal !important;
    line-height: 1.25 !important;
    text-align: center !important;
}

/* Notfall page */
.gdg-ps-notfall {
    width: min(980px, 100%);
    margin: 24px auto 34px;
    display: grid;
    gap: 20px;
    color: var(--gdg-ps-ink);
    text-align: left !important;
}

.gdg-ps-notfall * {
    box-sizing: border-box;
}

.gdg-ps-notfall__intro {
    max-width: 720px;
    padding: 10px 2px 4px;
    text-align: left !important;
}

.gdg-ps-notfall__intro h2 {
    margin: 7px 0 10px;
    color: var(--gdg-ps-ink) !important;
    font-size: clamp(1.85rem, 3.6vw, 2.65rem) !important;
    font-weight: 600;
    line-height: 1.14;
    text-align: left !important;
}

.gdg-ps-notfall__intro p {
    margin: 0;
    color: var(--gdg-ps-ink-soft) !important;
    font-size: 1rem;
    line-height: 1.65;
    text-align: left !important;
}

.gdg-ps-notfall__state {
    display: none;
}

body[data-gdg-praxisstatus="normal"] .gdg-ps-notfall__state[data-gdg-ps-state="normal"],
body[data-gdg-praxisstatus="afterhours"] .gdg-ps-notfall__state[data-gdg-ps-state="afterhours"],
body[data-gdg-praxisstatus="vertretung"] .gdg-ps-notfall__state[data-gdg-ps-state="vertretung"] {
    display: grid;
    gap: 14px;
}

.gdg-ps-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 30px;
    padding: clamp(24px, 4.4vw, 40px);
    border: 1px solid var(--gdg-ps-border);
    border-radius: 16px;
    box-shadow: var(--gdg-ps-shadow);
    text-align: left !important;
}

.gdg-ps-card--practice {
    border-color: rgba(120, 148, 136, 0.54);
    background: var(--gdg-ps-sage-soft);
}

.gdg-ps-card--regional {
    background: #f5faf8;
}

.gdg-ps-card--vertretung {
    border-color: rgba(163, 83, 55, 0.3);
    background: var(--gdg-ps-alert-soft);
}

.gdg-ps-card h3 {
    max-width: 690px;
    margin: 8px 0 10px;
    color: var(--gdg-ps-ink) !important;
    font-size: clamp(1.42rem, 2.7vw, 2rem) !important;
    font-weight: 600;
    line-height: 1.2;
    text-align: left !important;
}

.gdg-ps-card p {
    max-width: 650px;
    margin: 0;
    color: var(--gdg-ps-ink-soft) !important;
    font-size: 1rem;
    line-height: 1.6;
    text-align: left !important;
}

.gdg-ps-card__actions {
    display: grid;
    gap: 9px;
    min-width: min(240px, 100%);
}

.gdg-ps-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--gdg-ps-ink);
    border-radius: 8px;
    background: var(--gdg-ps-ink);
    color: #ffffff !important;
    cursor: default;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.gdg-ps-card--vertretung .gdg-ps-action {
    border-color: var(--gdg-ps-alert);
    background: var(--gdg-ps-alert);
}

.gdg-ps-action--secondary {
    border-color: currentColor;
    background: transparent;
    color: var(--gdg-ps-ink) !important;
}

.gdg-ps-card--vertretung .gdg-ps-action--secondary {
    border-color: var(--gdg-ps-alert);
    background: transparent;
    color: var(--gdg-ps-alert) !important;
}

.gdg-ps-card__note {
    grid-column: 1 / -1;
    margin-top: -8px !important;
    color: #6e7d83 !important;
    font-size: 0.9rem !important;
}

.gdg-ps-quiet-info {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding: 2px 3px;
    color: var(--gdg-ps-ink-soft);
    font-size: 0.91rem;
    line-height: 1.45;
}

.gdg-ps-quiet-info span {
    font-weight: 700;
}

.gdg-ps-quiet-info a {
    color: var(--gdg-ps-ink);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gdg-ps-booking-notice {
    width: min(980px, calc(100% - 48px));
    margin: 20px auto 0;
    padding: 16px 18px;
    border: 1px solid rgba(163, 83, 55, 0.28);
    border-radius: 12px;
    background: var(--gdg-ps-alert-soft);
    color: var(--gdg-ps-ink);
    text-align: left;
}

.gdg-ps-booking-notice strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1rem;
}

.gdg-ps-booking-notice p {
    margin: 0;
    color: var(--gdg-ps-ink-soft);
    font-size: 0.94rem;
    line-height: 1.55;
}

@media (max-width: 780px) {
    .gdg-ps-statusbar__inner {
        width: min(100% - 30px, 680px);
        min-height: 0;
        grid-template-columns: 28px minmax(0, 1fr);
        row-gap: 8px;
        column-gap: 10px;
        padding: 13px 0;
    }

    .gdg-ps-statusbar__marker {
        width: 25px;
        height: 25px;
    }

    .gdg-ps-statusbar__marker::before {
        inset: 7px;
    }

    .gdg-ps-statusbar__action {
        grid-column: 2;
        justify-self: start;
        min-height: 36px;
        padding: 8px 11px;
        font-size: 0.78rem;
    }

    .gdg-ps-statusbar p {
        font-size: 0.86rem;
    }

    .gdg-ps-card {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .gdg-ps-card__actions {
        min-width: 0;
        width: 100%;
    }

    .gdg-ps-quiet-info {
        align-items: start;
        flex-direction: column;
        gap: 4px;
    }

    .gdg-ps-booking-notice {
        width: min(100% - 30px, 680px);
    }
}

@media (max-width: 560px) {
    .gdg-ps-demo-trigger {
        right: 14px;
        bottom: 14px;
        min-height: 40px;
        padding: 9px 12px;
        font-size: 0.77rem;
    }

    .gdg-ps-demo-coachmark {
        right: 14px;
        bottom: 65px;
    }

    .gdg-ps-demo-panel {
        right: 14px;
        bottom: 64px;
        padding: 17px;
    }

    .gdg-ps-notfall {
        margin-top: 16px;
    }

    .gdg-ps-notfall__intro h2 {
        font-size: 1.82rem !important;
    }
}
