/*--------------------------------------------------------------
# Appointment Sidebar
--------------------------------------------------------------*/

/* Trigger button */
.aps-trigger {
    position: fixed;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    top: calc(50% + 155px);
    right: 15px;
    width: 60px;
    height: 60px;
    background: #C0392B;
    border-radius: 50%;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.25);
    transition: background 0.2s;
}

@media screen and (max-width: 991px) {
    .aps-trigger {
        top: unset;
        bottom: 15px;
    }
}

.aps-trigger:hover {
    background: #CD6155;
}

.aps-trigger:hover img {
    transform: scale(1.2);
}

.aps-trigger img {
    display: block;
    width: 32px;
    height: 32px;
}

/* Page push */
#page {
    transition: margin-right 0.35s ease;
}

#page.aps-page-shift {
    margin-right: 400px;
}

/* Sliding panel */
.aps-sidebar-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background: #fff;
    z-index: 99999999;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.18);
    display: none;
    flex-direction: column;
}

.aps-sidebar-panel.open {
    display: flex;
    transform: translateX(0);
}

.aps-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Header */
.aps-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--main-color, #c31b23);
    color: #fff;
    flex-shrink: 0;
}

.aps-sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Close button */
.aps-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aps-close-btn:hover {
    opacity: 0.7;
}

/* Back button */
.aps-back-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aps-back-btn:hover {
    opacity: 0.7;
}

/* Location picker */
.aps-location-picker {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 32px 24px;
}

.aps-location-btn {
    width: 100%;
    max-width: 280px;
    padding: 16px 24px;
    border: 2px solid var(--main-color, #c31b23);
    border-radius: 6px;
    background: var(--main-color, #c31b23) !important;
    background-color: var(--main-color, #c31b23) !important;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #fff !important;
    transition: background 0.2s, background-color 0.2s, color 0.2s;
    text-align: center;
}

.aps-location-btn:hover {
    background: var(--bh-color-brand-hover, #a6161d) !important;
    background-color: var(--bh-color-brand-hover, #a6161d) !important;
    color: #fff !important;
}

/* iFrame container */
.aps-iframe-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.aps-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Overlay — no transition on initial paint (avoids dark flash on load) */
.aps-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: none;
}

.aps-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

/*--------------------------------------------------------------
# Phone Contacts Sidebar
--------------------------------------------------------------*/

/* Position the phone trigger above the appointment trigger */
.pcs-trigger {
    top: calc(50% + 75px);
}

@media screen and (max-width: 991px) {
    .pcs-trigger {
        top: unset;
        bottom: 85px;
    }
}

/* Scrollable content area */
.pcs-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 24px;
}

/* Logo */
.pcs-logo {
    display: flex;
    justify-content: center;
    padding: 20px 24px 16px;
}

.pcs-logo img {
    max-width: 160px;
    height: auto;
}

/* Separator */
.pcs-separator {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 0;
}

/* Location block */
.pcs-location {
    padding: 18px 24px 16px;
}

/* Location header row: name + whatsapp icon */
.pcs-location-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.pcs-location-name {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #555;
    text-transform: uppercase;
}

/* WhatsApp icon button */
.pcs-whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    text-decoration: none;
    flex-shrink: 0;
}

.pcs-whatsapp-btn img {
    width: 36px;
    height: 36px;
}

/* Phone + WhatsApp on the same row */
.pcs-phone-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* Phone number */
.pcs-phone {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--main-color, #c31b23);
    text-decoration: none;
    margin-bottom: 0;
}

.pcs-phone:hover {
    text-decoration: underline;
}

/* Hours */
.pcs-hours-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    margin: 6px 0 2px;
}

.pcs-hours {
    font-size: 0.8rem;
    color: #555;
    margin: 0 0 2px;
}


/*--------------------------------------------------------------
# Contact Form Sidebar (CFS)
--------------------------------------------------------------*/

/* Position the contact form trigger above the phone trigger */
.cfs-trigger {
    top: calc(50% - 5px);
}

@media screen and (max-width: 991px) {
    .cfs-trigger {
        top: unset;
        bottom: 155px;
    }
}

/* Scrollable content area */
.cfs-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 32px;
}

/* Form + hint wrapper — matches pcs-location padding */
.cfs-form-wrap {
    padding: 18px 24px 0;
}

/* Email hint */
.cfs-email-hint {
    font-size: 0.85rem;
    color: #555;
    background: #f8f8f8;
    border-left: 3px solid var(--main-color, #c31b23);
    padding: 10px 14px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.cfs-email-hint a {
    color: var(--main-color, #c31b23);
    text-decoration: none;
    font-weight: 600;
}

.cfs-email-hint a:hover {
    text-decoration: underline;
}

/*--------------------------------------------------------------
# Widerruf Sidebar (WCS)
--------------------------------------------------------------*/

.widerruf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border: 2px solid var(--main-color, #c31b23);
    border-radius: 6px;
    background: #fff;
    color: var(--main-color, #c31b23);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.widerruf-btn:hover {
    background: var(--main-color, #c31b23);
    color: #fff;
}

.wcs-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0 32px;
}

.wcs-form-wrap {
    padding: 0 24px 0;
}

/*--------------------------------------------------------------
# Ninja Forms — Contact Form Sidebar styling
--------------------------------------------------------------*/

.cfs-content .nf-form-content,
.wcs-content .nf-form-content,
.cfs-content .nf-form-content * {
    box-sizing: border-box;
}

.wcs-content .nf-form-content * {
    box-sizing: border-box;
}

/* Remove default NF outer padding/margins */
.cfs-content .nf-form-content {
    padding: 0;
}

.wcs-content .nf-form-content {
    padding: 0;
}

.cfs-content .nf-field-container {
    margin-bottom: 14px;
    padding: 0;
}

.wcs-content .nf-field-container {
    margin-bottom: 14px;
    padding: 0;
}

/* Hide labels (sidebar uses placeholders) */
.cfs-content .nf-field-label {
    display: none;
}

.wcs-content .nf-field-label {
    display: none;
}

/* Shared input / textarea styles */
.cfs-content .ninja-forms-field.nf-element {
    width: 100%;
    display: block;
    padding: 11px 14px;
    font-size: 0.9rem;
    color: #1a1a1a;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.wcs-content .ninja-forms-field.nf-element {
    width: 100%;
    display: block;
    padding: 11px 14px;
    font-size: 0.9rem;
    color: #1a1a1a;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.cfs-content .ninja-forms-field.nf-element:focus {
    border-color: var(--main-color, #c31b23);
    box-shadow: 0 0 0 3px rgba(195, 27, 35, 0.12);
}

.wcs-content .ninja-forms-field.nf-element:focus {
    border-color: var(--main-color, #c31b23);
    box-shadow: 0 0 0 3px rgba(195, 27, 35, 0.12);
}

.cfs-content .ninja-forms-field.nf-element::placeholder {
    color: #aaa;
}

.wcs-content .ninja-forms-field.nf-element::placeholder {
    color: #aaa;
}

/* Textarea */
.cfs-content textarea.ninja-forms-field.nf-element {
    min-height: 110px;
    resize: vertical;
}

.wcs-content textarea.ninja-forms-field.nf-element {
    min-height: 110px;
    resize: vertical;
}

/* Submit button — full width, red */
.cfs-content input[type="submit"].ninja-forms-field,
.cfs-content .nf-element.contact-form-btn,
.wcs-content input[type="submit"].ninja-forms-field,
.wcs-content .nf-element.contact-form-btn {
    width: 100%;
    display: block;
    padding: 13px 20px;
    background: var(--main-color, #c31b23);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.cfs-content input[type="submit"].ninja-forms-field:hover,
.cfs-content .nf-element.contact-form-btn:hover,
.wcs-content input[type="submit"].ninja-forms-field:hover,
.wcs-content .nf-element.contact-form-btn:hover {
    background: #a5161d;
}

.cfs-content input[type="submit"].ninja-forms-field:active,
.cfs-content .nf-element.contact-form-btn:active,
.wcs-content input[type="submit"].ninja-forms-field:active,
.wcs-content .nf-element.contact-form-btn:active {
    transform: scale(0.98);
}

/* Error messages */
.cfs-content .nf-error-wrap .nf-error-msg {
    font-size: 0.78rem;
    color: #c31b23;
    margin-top: 4px;
    display: block;
}

.wcs-content .nf-error-wrap .nf-error-msg {
    font-size: 0.78rem;
    color: #c31b23;
    margin-top: 4px;
    display: block;
}

/* Remove any NF-added table/cell layout quirks */
.cfs-content .nf-field-element {
    width: 100%;
}

.wcs-content .nf-field-element {
    width: 100%;
}

.cfs-content .field-wrap {
    width: 100%;
}

.wcs-content .field-wrap {
    width: 100%;
}

/*--------------------------------------------------------------
# Mobile Combined Contact Sidebar (MCS)
--------------------------------------------------------------*/

/* Only show MCS trigger on mobile (≤600px) */
.mcs-trigger {
    display: none;
    bottom: 85px;
}

.mcs-choice-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.mcs-choice-btn img {
    filter: none;
    flex-shrink: 0;
}

/* Phone/WhatsApp content pane inside MCS */
.mcs-phone-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 24px;
}

/* Mobile */
@media (max-width: 600px) {
    .aps-sidebar-panel {
        width: 100%;
        box-shadow: none;
    }

    #page.aps-page-shift {
        margin-right: 0;
    }

    /* Hide individual phone and contact form triggers — MCS replaces them */
    #pcs-trigger-btn,
    #cfs-trigger-btn {
        display: none !important;
    }

    /* Show the combined mobile trigger */
    .mcs-trigger {
        display: flex;
    }
}

/* Hide header CTA on small screens — floating appointment trigger remains */
@media screen and (max-width: 900px) {
    .jetzt-bewerben-btn.jbs-trigger,
    .bh-header__cta {
        display: none;
    }
}