:root {
    --scp-primary: #f36f27;
    --scp-primary-light: rgba(169, 194, 195, 0.15);
    --scp-green: #4ed199;
    --scp-dark: #18181b;
    --scp-white: #ffffff;
    --scp-border: #e9ecef;
    --scp-text: rgba(0, 0, 0, 0.7);
    --scp-heading: #000000;
    --scp-muted: #71717a;

    --scp-radius: 15px;
    --scp-button-radius: 10px;
    --scp-bottom: 20px;
    --scp-right: 20px;

    --scp-launcher-size: 50px;
    --scp-popup-width: 380px;

    --scp-shadow:
        0 0.25rem 0.5rem rgba(0, 0, 0, 0.05),
        0 1.5rem 2.2rem rgba(0, 0, 0, 0.1);

    --scp-launcher-shadow:
        0 1px 5px rgba(0, 0, 0, 0.15),
        0 0 1px 1px rgba(0, 0, 0, 0.1);

    --scp-transition:
        all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/*
 * Prevent global theme and Elementor button styles
 * from affecting the launcher and popup close button.
 */
body button.scp-launcher,
body button.scp-popup-close {
    appearance: none !important;
    -webkit-appearance: none !important;

    padding: 0 !important;
    margin: 0 !important;

    min-width: 0 !important;
    min-height: 0 !important;

    border: 0 !important;
    outline: 0;
    line-height: 1 !important;

    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;

    box-sizing: border-box !important;
}

/* Floating launcher button */
body button.scp-launcher {
    position: fixed;
    right: var(--scp-right);
    bottom: var(--scp-bottom);
    z-index: 1000000004;

    width: var(--scp-launcher-size) !important;
    height: var(--scp-launcher-size) !important;
    max-width: var(--scp-launcher-size) !important;
    max-height: var(--scp-launcher-size) !important;

    border-radius: 50% !important;

    background: var(--scp-primary) !important;
    color: var(--scp-white) !important;
    box-shadow: var(--scp-launcher-shadow);

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    overflow: hidden;

    transition:
        transform 200ms cubic-bezier(0, 0.2, 0.3, 1),
        box-shadow 200ms ease,
        background-color 200ms ease;
}

body button.scp-launcher:hover {
    background: var(--scp-primary) !important;
    color: var(--scp-white) !important;
    transform: scale(1.06);
}

body button.scp-launcher:focus {
    background: var(--scp-primary) !important;
    color: var(--scp-white) !important;
}

body button.scp-launcher:focus-visible {
    outline: 3px solid rgba(109, 152, 153, 0.3);
    outline-offset: 3px;
}

.scp-launcher-open,
.scp-launcher-close {
    width: 100%;
    height: 100%;

    padding: 0;
    margin: 0;

    align-items: center;
    justify-content: center;

    color: inherit;
    pointer-events: none;
}

.scp-launcher-open {
    display: flex;
}

.scp-launcher-close {
    display: none;

    font-size: 30px;
    font-weight: 400;
    line-height: 1;
}

.scp-launcher.scp-is-open .scp-launcher-open {
    display: none;
}

.scp-launcher.scp-is-open .scp-launcher-close {
    display: flex;
}

.scp-launcher svg {
    display: block;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

/* Popup wrapper */
.scp-contact-popup {
    position: fixed;
    right: var(--scp-right);
    bottom: calc(
        var(--scp-bottom) +
        var(--scp-launcher-size) +
        20px
    );
    z-index: 1000000003;

    width: var(--scp-popup-width);
    max-width: calc(100vw - 40px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(12px) scale(0.96);
    transform-origin: bottom right;

    transition: var(--scp-transition);
}

.scp-contact-popup.scp-is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0) scale(1);
}

/* Popup card */
.scp-popup-card {
    position: relative;

    width: 100%;
    padding: 25px;
    margin: 0;

    background: var(--scp-white);
    border: 0;
    border-radius: var(--scp-radius);
    box-shadow: var(--scp-shadow);

    color: var(--scp-text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -0.01em;

    box-sizing: border-box;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Popup close button */
body button.scp-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;

    width: 35px !important;
    height: 35px !important;
    max-width: 35px !important;
    max-height: 35px !important;

    border-radius: 50% !important;

    background: rgba(173, 181, 189, 0.18) !important;
    color: rgba(173, 181, 189, 1) !important;
    box-shadow: none !important;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition:
        background-color 200ms ease,
        color 200ms ease,
        transform 200ms ease;
}

body button.scp-popup-close:hover {
    background: rgba(173, 181, 189, 0.28) !important;
    color: #71717a !important;
    transform: scale(1.04);
}

body button.scp-popup-close:focus {
    background: rgba(173, 181, 189, 0.18) !important;
    color: rgba(173, 181, 189, 1) !important;
}

body button.scp-popup-close:focus-visible {
    outline: 3px solid rgba(173, 181, 189, 0.25);
    outline-offset: 2px;
}

.scp-popup-close span {
    position: absolute;

    width: 14px;
    height: 2px;

    padding: 0;
    margin: 0;

    border-radius: 2px;
    background: currentColor;

    pointer-events: none;
}

.scp-popup-close span:first-child {
    transform: rotate(45deg);
}

.scp-popup-close span:last-child {
    transform: rotate(-45deg);
}

/* Popup content */
.scp-popup-section {
    padding: 0 28px 0 0;
    margin: 0;
}

.scp-popup-section h5 {
    padding: 0;
    margin: 0 0 4px;

    color: var(--scp-heading);

    font-family:
        "Bricolage Grotesque",
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.scp-popup-section p {
    padding: 0;
    margin: 0 0 12px;

    color: var(--scp-text);

    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.scp-divider {
    width: 100%;
    height: 1px;

    padding: 0;
    margin: 20px 0;

    border: 0;
    background: var(--scp-border);
}

/* Action buttons */
.scp-button {
    width: 100%;
    min-height: 44px;

    padding: 10px 14px;
    margin: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: 0;
    border-radius: var(--scp-button-radius);

    color: var(--scp-white) !important;
    text-decoration: none !important;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;

    box-sizing: border-box;

    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        opacity 180ms ease;
}

.scp-button:hover,
.scp-button:focus {
    color: var(--scp-white) !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    opacity: 0.95;
}

.scp-button:focus-visible {
    outline: 3px solid rgba(109, 152, 153, 0.25);
    outline-offset: 2px;
}

.scp-button-icon {
    width: 22px;
    height: 22px;

    padding: 0;
    margin: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 22px;
}

.scp-button-icon svg {
    display: block;
    width: 22px;
    height: 22px;
}

.scp-button-whatsapp {
    background: var(--scp-green);
}

.scp-button-whatsapp:hover,
.scp-button-whatsapp:focus {
    background: var(--scp-green);
}

.scp-button-dark {
    background: var(--scp-dark);
}

.scp-button-dark:hover,
.scp-button-dark:focus {
    background: var(--scp-dark);
}

.scp-button-primary {
    background: var(--scp-primary);
}

.scp-button-primary:hover,
.scp-button-primary:focus {
    background: var(--scp-primary);
}

/* Reply time */
.scp-reply-time {
    padding: 0;
    margin: 18px 0 0;

    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--scp-text);

    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}

.scp-reply-time strong {
    color: var(--scp-heading);
    font-weight: 700;
}

.scp-reply-icon {
    width: 24px;
    height: 24px;

    padding: 0;
    margin: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 24px;

    font-size: 16px;
    line-height: 1;
}

/* Mobile */
@media (max-width: 767px) {
    :root {
        --scp-bottom: 15px;
        --scp-right: 15px;
    }

    .scp-contact-popup {
        bottom: calc(
            var(--scp-bottom) +
            var(--scp-launcher-size) +
            20px
        );

        max-width: calc(100vw - 30px);
    }

    .scp-popup-card {
        padding: 20px;
    }

    .scp-popup-section {
        padding-right: 24px;
    }

    body button.scp-popup-close {
        top: 12px;
        right: 12px;
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .scp-launcher,
    .scp-contact-popup,
    .scp-popup-close,
    .scp-button {
        transition: none !important;
    }
}