/* ============================================================================
   OVERCROSS - the floating "Beratungs-Call" tab, Layout::parts.termin-fab.

   Mobile first on the 600 / 900 / 1200 ladder (see base.css):

     below 900   a round 48px button in the thumb corner, stacked above the
                 live chat button (public/css/live-chat.css: 52px below 600,
                 56px from 600, 16px from the edge) - icon only, the label is
                 its aria-label
     900 and up  a vertical tab on the middle of the right edge, icon and
                 label; the chat keeps the bottom corner to itself

   It steps aside wherever something else already owns that space:
     - the tour page's bottom action bar carries its own call slot
       (html.oc-tour-past-hero, phone only - the bar is never shown from 900)
     - an open enquiry / call / booking form (html.oc-tour-form-open)
     - the phone's side menu (body.menu-open) and the chat sheet (html.lc-lock)

   z-index 3940: under the live chat (3950 / 9999), so an open chat window
   covers it, over the header (3000/3001), far under the call sheet (99999).

   Colours are the house's: #111214 black ground, #EDE3D5 milk text, the
   orange only on the icon - the orange button in that corner is the chat.
   ========================================================================= */

.termin-fab {
    position: fixed;
    z-index: 3940;
    right: max(18px, env(safe-area-inset-right, 0px));
    bottom: calc(16px + 52px + 12px + env(safe-area-inset-bottom, 0px));

    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;

    background: #111214;
    color: #EDE3D5;
    border: 1px solid rgba(237, 227, 213, 0.25);
    box-shadow: 0 4px 18px rgba(17, 18, 20, 0.35);
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: transform 0.2s ease, background-color 0.2s ease, bottom 0.22s ease;
}

.termin-fab:hover,
.termin-fab:focus {
    color: #EDE3D5;
    text-decoration: none;
}

.termin-fab:active {
    transform: scale(0.95);
}

.termin-fab:focus-visible {
    outline: 3px solid #FF6A00;
    outline-offset: 3px;
}

.termin-fab__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #FF6A00;
}

.termin-fab__label {
    display: none;
}

/* Out of the way while something else owns the bottom of the phone. */
html.oc-tour-past-hero .termin-fab,
html.oc-tour-form-open .termin-fab,
html.lc-lock .termin-fab,
body.menu-open .termin-fab {
    display: none;
}

@media (min-width: 600px) {
    /* The chat button grows to 56px from this rung. */
    .termin-fab {
        bottom: calc(16px + 56px + 12px + env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 900px) {
    .termin-fab {
        top: 50%;
        right: 0;
        bottom: auto;
        transform: translateY(-50%);

        flex-direction: column;
        gap: 10px;
        width: auto;
        height: auto;
        min-width: 44px;
        padding: 16px 11px;
        border-right: 0;
        border-radius: 10px 0 0 10px;
        box-shadow: -2px 4px 18px rgba(17, 18, 20, 0.28);
    }

    .termin-fab__label {
        display: block;
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        font-size: 14px;
        font-weight: 600;
        letter-spacing: 0.04em;
        line-height: 1;
        white-space: nowrap;
    }

    .termin-fab:active {
        transform: translateY(-50%) scale(0.97);
    }

    /* The bottom action bar does not exist here; the tab stays on the tour
       page. A form still owns the screen while it is open. */
    html.oc-tour-past-hero .termin-fab {
        display: flex;
    }
}

@media (min-width: 900px) and (hover: hover) {
    .termin-fab:hover {
        background: #26282c;
        padding-right: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .termin-fab {
        transition: none;
    }
}
