/* ============================================================
   Pływający widget kontaktowy (Napisz / Zadzwoń)
   Desktop: kwadraty przy prawej krawędzi.
   Mobile: pasek na dole. Modal z formularzem CF7.
   ============================================================ */
.oh-fab {
    --oh-dark: #1C2321;
    --oh-dark-2: #141918;
    --oh-accent: #8C7A6B;
    --oh-text: #FFFFFF;

    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99990;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-radius: 8px 0 0 8px;
    overflow: visible;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}

.oh-fab__btn {
    position: relative;
    width: 66px;
    height: 66px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    margin: 0;
    background: var(--oh-dark);
    color: var(--oh-text);
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    line-height: 1;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.oh-fab__btn:first-child { border-radius: 8px 0 0 0; }
.oh-fab__btn:last-child  { border-radius: 0 0 0 8px; }

.oh-fab__btn:hover,
.oh-fab__btn:focus-visible {
    background: var(--oh-accent);
    color: #fff;
    outline: none;
}

.oh-fab__icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
}
.oh-fab__icon svg { width: 100%; height: 100%; display: block; }

.oh-fab__label {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
}

/* Dymek z numerem (desktop) */
.oh-fab__phone {
    position: relative;
}
.oh-fab__phone-pop {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    background: var(--oh-dark-2);
    color: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.oh-fab.is-phone-open .oh-fab__phone-pop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}
.oh-fab__phone-pop::after {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 7px solid transparent;
    border-left-color: var(--oh-dark-2);
}
.oh-fab__phone-pop .oh-fab__phone-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #A0A5A4;
    margin-bottom: 4px;
}
.oh-fab__phone-pop a {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
}
.oh-fab__phone-pop a:hover { color: var(--oh-accent); }

/* ===================== MODAL ===================== */
.oh-cmodal {
    position: fixed;
    inset: 0;
    z-index: 99995;
    display: none;
}
.oh-cmodal.is-open { display: block; }

.oh-cmodal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 25, 24, 0.62);
    backdrop-filter: blur(2px);
}

.oh-cmodal__dialog {
    position: relative;
    width: calc(100% - 32px);
    max-width: 560px;
    margin: 6vh auto;
    background: #fff;
    color: #2C2C2C;
    border-radius: 8px;
    padding: 40px 36px 32px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.oh-cmodal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #8A8F8E;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.oh-cmodal__close:hover { background: #F0EEEA; color: #1C2321; }

.oh-cmodal__title {
    font-size: 1.7rem;
    font-weight: 500;
    margin: 0 0 6px;
    color: #1C2321;
}
.oh-cmodal__intro {
    font-size: 0.95rem;
    color: #6B7271;
    margin: 0 0 22px;
}

/* Formularz CF7 w modalu — samodzielny, niezależny od motywu */
.oh-cmodal .hidden-fields-container { display: none; }

.oh-cmodal .wpcf7-form input.w-input,
.oh-cmodal .wpcf7-form input[type="text"],
.oh-cmodal .wpcf7-form input[type="email"],
.oh-cmodal .wpcf7-form input[type="tel"],
.oh-cmodal .wpcf7-form input[type="number"],
.oh-cmodal .wpcf7-form textarea,
.oh-cmodal .wpcf7-form select {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: #fff;
    color: #2C2C2C;
    border: 1px solid #D7D7D4;
    border-radius: 4px;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.2s ease;
}
.oh-cmodal .wpcf7-form textarea { min-height: 110px; resize: vertical; }

.oh-cmodal .wpcf7-form input.w-input:focus,
.oh-cmodal .wpcf7-form input:focus,
.oh-cmodal .wpcf7-form textarea:focus {
    outline: none;
    border-color: var(--oh-accent, #8C7A6B);
}
.oh-cmodal .wpcf7-form input::placeholder,
.oh-cmodal .wpcf7-form textarea::placeholder { color: #9AA09E; opacity: 1; }

.oh-cmodal .form-zgody {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 6px 0 4px;
}
.oh-cmodal .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.oh-cmodal .wpcf7-acceptance label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}
.oh-cmodal .wpcf7-acceptance input[type="checkbox"] {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    margin: 2px 10px 0 0;
    accent-color: #1C2321;
}
.oh-cmodal .wpcf7-list-item-label,
.oh-cmodal .zgoda-text-text {
    font-size: 0.72rem;
    line-height: 1.45;
    color: #7E8483;
}
.oh-cmodal .zgoda-link { color: #1C2321; text-decoration: underline; }

.oh-cmodal .wpcf7-form .submit-btn,
.oh-cmodal .wpcf7-form input[type="submit"] {
    width: 100%;
    margin-top: 14px;
    padding: 15px 24px;
    background: #1C2321;
    background-image: none;
    color: #fff;
    border: 1px solid #1C2321;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.oh-cmodal .wpcf7-form input[type="submit"]:hover {
    background: var(--oh-accent, #8C7A6B);
    border-color: var(--oh-accent, #8C7A6B);
}
.oh-cmodal .wpcf7-response-output { margin: 14px 0 0 !important; font-size: 0.85rem; }
.oh-cmodal .wpcf7-not-valid-tip { color: #c0392b; font-size: 0.75rem; }
.oh-cmodal .wpcf7-form .wpcf7-pum { display: none; }

/* Blokada scrolla tła */
body.oh-noscroll { overflow: hidden; }

/* ===================== MOBILE ===================== */
@media (max-width: 767px) {
    .oh-fab {
        right: 0;
        left: 0;
        top: auto;
        bottom: 0;
        transform: none;
        flex-direction: row;
        gap: 0;
        border-radius: 0;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
    }
    .oh-fab__btn {
        flex: 1 1 50%;
        width: auto;
        height: 56px;
        flex-direction: row;
        gap: 9px;
        border-radius: 0 !important;
    }
    .oh-fab__btn + .oh-fab__btn { border-left: 1px solid rgba(255, 255, 255, 0.12); }
    .oh-fab__icon { width: 18px; height: 18px; }
    .oh-fab__label { font-size: 12px; }
    .oh-fab__phone-pop { display: none !important; }

    .oh-cmodal__dialog {
        margin: 0;
        width: 100%;
        max-width: none;
        min-height: 100%;
        border-radius: 0;
        padding: 56px 22px 90px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .oh-fab__btn,
    .oh-fab__phone-pop,
    .oh-cmodal__close { transition: none; }
}
