:root {
    --feedback-primary: #0099a8;
    --feedback-bg: #e5f5f8;
}

.feedback-popup {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    z-index: 9999;
    width: min(420px, calc(100vw - 2rem));
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    font-family: inherit;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity .3s ease, visibility .3s ease, transform .3s ease;
}

.feedback-popup.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.feedback-popup__inner {
    position: relative;
    padding: 24px 24px 28px;
    background: var(--feedback-bg);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.feedback-popup__title {
    margin: 0 32px 8px 0;
    color: var(--feedback-primary);
    font-size: 24px;
    font-weight: 700;
}

.feedback-popup__intro {
    margin: 0 0 16px;
    font-size: 15px;
}

.feedback-popup__close {
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #222;
    font-size: 28px;
    line-height: 1;
}

.feedback-popup-toggle {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    z-index: 9998;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--feedback-primary);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .2);
}

.feedback-popup.is-visible + .feedback-popup-toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#feedback-popup .gform_wrapper {
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

#feedback-popup .gfield {
    margin-bottom: 12px;
}

#feedback-popup .gf_page_steps {
    display: none;
}

#feedback-popup .gfield_label {
    margin-bottom: 4px;
    font-weight: 600;
}

#feedback-popup .gfield_description {
    font-size: 13px;
}

#feedback-popup input[type="text"],
#feedback-popup input[type="email"],
#feedback-popup input[type="number"],
#feedback-popup textarea,
#feedback-popup select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 12px !important;
    background: #fff;
}

#feedback-popup .gform_footer,
#feedback-popup .gform_page_footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

#feedback-popup .gform_button,
#feedback-popup .gform_next_button,
#feedback-popup .gform_previous_button {
    min-height: 44px;
    padding: 12px 26px !important;
    border: 0;
    border-radius: 999px !important;
    background: var(--feedback-primary) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}

#feedback-popup .gform_next_button,
#feedback-popup .gform_button {
    width: 100%;
    max-width: 320px;
}

#feedback-popup .gform_previous_button {
    border: 2px solid var(--feedback-primary) !important;
    background: transparent !important;
    color: var(--feedback-primary) !important;
}

#feedback-popup .gform_confirmation_wrapper,
#feedback-popup .gform_confirmation_message {
    margin: 0 !important;
    padding: 40px 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center;
}

@media (max-width: 600px) {
    .feedback-popup {
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: 100vh;
        padding: 0 10px 10px;
    }

    .feedback-popup__inner {
        border-radius: 12px 12px 0 0;
    }

    .feedback-popup-toggle {
        right: auto;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
    }
}
