/* ===================================================
   Float CTA Block – Frontend CSS
   Prefix: fc-
   =================================================== */

/* ── Container ── */
.fc-wrap {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: var(--fc-z-index, 9999);
    transition: opacity 0.3s ease;
}
.fc-wrap[data-pos="right"] {
    right: 0;
}
.fc-wrap[data-pos="left"] {
    left: 0;
}

/* ── Kontakt-Button ── */
.fc-kontakt {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--fc-size, 56px);
    height: var(--fc-size, 56px);
    background: var(--fc-kontakt-bg, #1a1a2e);
    color: var(--fc-kontakt-color, #fff);
    border-radius: var(--fc-radius, 8px);
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(.4,0,.2,1),
                box-shadow 0.25s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.fc-kontakt:hover,
.fc-kontakt:focus-visible {
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    color: var(--fc-kontakt-color, #fff);
    text-decoration: none;
}
.fc-kontakt svg,
.fc-kontakt img {
    width: 24px;
    height: 24px;
    display: block;
    pointer-events: none;
}
.fc-kontakt img {
    object-fit: contain;
}

/* ── Projekt-Button (vertikal) ── */
.fc-projekt {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--fc-size, 56px);
    background: #a2185b;
    color: var(--fc-projekt-color, #fff);
    border-radius: var(--fc-radius, 8px);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 18px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.2;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s cubic-bezier(.4,0,.2,1),
                box-shadow 0.25s ease;
    font-family: inherit;
    -webkit-appearance: none;
}
.fc-projekt:hover,
.fc-projekt:focus-visible {
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* ── Overlay ── */
.fc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: calc(var(--fc-z-index, 9999) + 10);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.fc-overlay.fc-overlay--active {
    opacity: 1;
    visibility: visible;
}

/* ── Popup ── */
.fc-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--fc-popup-bg, #ffffff);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
    z-index: calc(var(--fc-z-index, 9999) + 20);
    padding: 40px 32px 32px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(.4,0,.2,1);
}
.fc-popup.fc-popup--active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* ── Popup Close ── */
.fc-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--fc-popup-text, #333);
    transition: background 0.2s ease;
    padding: 0;
}
.fc-popup__close:hover,
.fc-popup__close:focus-visible {
    background: rgba(0, 0, 0, 0.06);
}
.fc-popup__close svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* ── Popup Content ── */
.fc-popup__titel {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--fc-popup-heading, #1a1a2e);
    line-height: 1.3;
}
.fc-popup__text {
    font-size: 0.95rem;
    margin: 0 0 20px;
    color: var(--fc-popup-text, #333);
    line-height: 1.6;
}

/* ── Popup Kontaktdaten ── */
.fc-popup__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.fc-popup__meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--fc-popup-text, #333);
    text-decoration: none;
    transition: color 0.2s ease;
}
.fc-popup__meta-item:hover {
    color: var(--fc-popup-accent, #a2185b);
    text-decoration: none;
}
.fc-popup__meta-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--fc-popup-accent, #a2185b);
}

/* ── CF7-Formular Anpassung im Popup ── */
.fc-popup .wpcf7 input[type="text"],
.fc-popup .wpcf7 input[type="email"],
.fc-popup .wpcf7 input[type="tel"],
.fc-popup .wpcf7 input[type="url"],
.fc-popup .wpcf7 textarea,
.fc-popup .wpcf7 select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
    background: transparent;
    font-family: inherit;
}
.fc-popup .wpcf7 input:focus,
.fc-popup .wpcf7 textarea:focus,
.fc-popup .wpcf7 select:focus {
    outline: none;
    border-color: var(--fc-popup-accent, #a2185b);
}
.fc-popup .wpcf7 input[type="submit"] {
    background: var(--fc-popup-accent, #a2185b);
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-family: inherit;
    width: 100%;
}
.fc-popup .wpcf7 input[type="submit"]:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.fc-popup .wpcf7 label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fc-popup-text, #333);
}
.fc-popup .wpcf7 p {
    margin: 0 0 14px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .fc-wrap {
        gap: 2px;
    }
    .fc-popup {
        width: 95%;
        padding: 32px 20px 24px;
        border-radius: 12px;
    }
    .fc-popup__meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* ── Focus-Visible für Barrierefreiheit ── */
.fc-kontakt:focus-visible,
.fc-projekt:focus-visible,
.fc-popup__close:focus-visible {
    outline: 2px solid var(--fc-popup-accent, #a2185b);
    outline-offset: 2px;
}

/* ── Drucken ausblenden ── */
@media print {
    .fc-wrap,
    .fc-overlay,
    .fc-popup {
        display: none !important;
    }
}
