/* =====================================================
   BLACKBUCKS STUDENT / TPO QUESTIONNAIRE
===================================================== */

#bb-audience-widget {
    position: fixed;

    right: 24px;
    bottom: 24px;

    z-index: 999999;

    font-family:
        Inter,
        Roboto,
        Arial,
        sans-serif;
}


/* =====================================================
   FLOATING LOGO
===================================================== */

#bb-audience-trigger {

    display: none;

    align-items: center;
    justify-content: center;

    width: 70px;
    height: 70px;

    padding: 0;

    border: none;

    border-radius: 50%;

    background: #ffffff;

    cursor: pointer;

    box-shadow:
        0 8px 30px rgba(31, 41, 55, 0.25),
        0 0 20px rgba(140, 108, 245, 0.3);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;

    animation:
        bbWidgetAppear 0.4s ease forwards,
        bbWidgetPulse 2s ease-in-out 0.8s infinite;
}


#bb-audience-trigger:hover {

    transform:
        translateY(-3px)
        scale(1.1);

    box-shadow:
        0 12px 40px rgba(31, 41, 55, 0.3),
        0 0 30px rgba(140, 108, 245, 0.4);

    animation: none;
}


#bb-audience-trigger img {

    width: 100%;
    height: 100%;

    object-fit: contain;

    display: block;
}


/* =====================================================
   POPUP
===================================================== */

#bb-audience-box {

    display: none;

    position: absolute;

    right: 0;
    bottom: 72px;

    width: 365px;

    max-width:
        calc(100vw - 30px);

    padding: 26px;

    box-sizing: border-box;

    background: #ffffff;

    border:
        1px solid rgba(140, 108, 245, 0.15);

    border-radius: 20px;

    box-shadow:
        0 25px 70px rgba(31, 41, 55, 0.18),
        0 5px 20px rgba(0, 0, 0, 0.05);

    animation:
        bbPopupAppear 0.25s ease forwards;
}


/* =====================================================
   CLOSE
===================================================== */

#bb-audience-close {

    position: absolute;

    top: 12px;
    right: 12px;

    width: 30px;
    height: 30px;

    border: none;

    border-radius: 50%;

    background: #f5f5f7;

    color: #6b7280;

    font-size: 20px;

    line-height: 1;

    cursor: pointer;

    transition: 0.2s ease;
}


#bb-audience-close:hover {

    background: #ececf1;

    color: #111827;

    transform: rotate(90deg);
}


/* =====================================================
   STEPS
===================================================== */

.bb-step {

    display: none;
}


.bb-step.active {

    display: block;

    animation:
        bbStepAppear 0.25s ease;
}


/* =====================================================
   LOGO INSIDE
===================================================== */

.bb-question-logo {

    width: 48px;
    height: 48px;

    margin-bottom: 15px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: #f7f5ff;

    overflow: hidden;
}


.bb-question-logo.small {

    width: 40px;
    height: 40px;

    margin-bottom: 12px;
}


.bb-question-logo img {

    width: 85%;
    height: 85%;

    object-fit: contain;
}


/* =====================================================
   HEADINGS
===================================================== */

.bb-step h3 {

    margin:
        0 0 7px;

    padding-right: 25px;

    color: #1f2937;

    font-size: 20px;

    line-height: 1.3;

    font-weight: 700;
}


.bb-step p {

    margin:
        0 0 18px;

    color: #6b7280;

    font-size: 13px;

    line-height: 1.55;
}


/* =====================================================
   CHOICE BUTTONS
===================================================== */

.bb-choice {

    width: 100%;

    display: flex;

    align-items: center;

    gap: 11px;

    box-sizing: border-box;

    padding: 12px;

    margin-bottom: 9px;

    border:
        1px solid #e7e7ec;

    border-radius: 12px;

    background: #ffffff;

    cursor: pointer;

    text-align: left;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.bb-choice:hover {

    border-color:
        rgba(140, 108, 245, 0.55);

    background:
        #faf9ff;

    transform:
        translateX(3px);

    box-shadow:
        0 5px 15px rgba(140, 108, 245, 0.08);
}


/* =====================================================
   CHOICE ICON
===================================================== */

.bb-choice-icon {

    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #f5f5f8;

    font-size: 18px;
}


/* =====================================================
   CHOICE CONTENT
===================================================== */

.bb-choice-content {

    min-width: 0;

    flex: 1;
}


.bb-choice-content strong {

    display: block;

    margin-bottom: 2px;

    color: #1f2937;

    font-size: 13px;

    font-weight: 600;
}


.bb-choice-content small {

    display: block;

    color: #8a93a3;

    font-size: 10px;

    line-height: 1.4;
}


/* =====================================================
   ARROW
===================================================== */

.bb-arrow {

    flex-shrink: 0;

    color: #9ca3af;

    font-size: 17px;

    transition: 0.2s ease;
}


.bb-choice:hover .bb-arrow {

    color: #8c6cf5;

    transform:
        translateX(3px);
}


/* =====================================================
   BACK
===================================================== */

.bb-back {

    border: none;

    padding: 0;

    margin:
        0 0 15px;

    background: transparent;

    color: #6b7280;

    font-size: 14px;

    cursor: pointer;

    display: flex;

    align-items: center;

    gap: 4px;

    transition: color 0.2s ease;
}


.bb-back:hover {

    color: #8c6cf5;
}


/* =====================================================
   FINAL BUTTONS
===================================================== */

.bb-primary,
.bb-secondary {

    width: 100%;

    padding: 12px 15px;

    border-radius: 10px;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s ease;
}


.bb-primary {

    border: none;

    background:
        linear-gradient(
            135deg,
            #8c6cf5,
            #7357e8
        );

    color: #ffffff;

    box-shadow:
        0 5px 15px rgba(140, 108, 245, 0.20);
}


.bb-primary:hover {

    transform:
        translateY(-1px);

    box-shadow:
        0 8px 20px rgba(140, 108, 245, 0.28);
}


.bb-secondary {

    margin-top: 8px;

    border:
        1px solid #e5e7eb;

    background: #ffffff;

    color: #6b7280;
}


.bb-secondary:hover {

    background: #f8f9fb;
}


/* =====================================================
   SUCCESS
===================================================== */

.bb-success-icon {

    width: 55px;
    height: 55px;

    margin-bottom: 15px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #ecfdf5;

    color: #10b981;

    font-size: 27px;

    font-weight: 700;
}


/* =====================================================
   ANIMATIONS
===================================================== */

@keyframes bbWidgetAppear {

    from {

        opacity: 0;

        transform:
            scale(0.5)
            translateY(20px);

    }

    to {

        opacity: 1;

        transform:
            scale(1)
            translateY(0);

    }

}


@keyframes bbWidgetPulse {

    0%, 100% {

        box-shadow:
            0 8px 30px rgba(31, 41, 55, 0.25),
            0 0 20px rgba(140, 108, 245, 0.3);

    }

    50% {

        box-shadow:
            0 12px 40px rgba(31, 41, 55, 0.35),
            0 0 40px rgba(140, 108, 245, 0.5);

    }

}


@keyframes bbPopupAppear {

    from {

        opacity: 0;

        transform:
            translateY(10px)
            scale(0.96);

    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            scale(1);

    }

}


@keyframes bbStepAppear {

    from {

        opacity: 0;

        transform:
            translateX(8px);

    }

    to {

        opacity: 1;

        transform:
            translateX(0);

    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 600px) {

    #bb-audience-widget {

        right: 15px;

        bottom: 15px;

    }


    #bb-audience-trigger {

        width: 52px;
        height: 52px;

        padding: 0;

    }


    #bb-audience-box {

        right: 0;

        bottom: 65px;

        width: 340px;

        max-width:
            calc(100vw - 25px);

        padding: 22px;

        border-radius: 18px;

    }


    .bb-step h3 {

        font-size: 18px;

    }


    .bb-choice {

        padding: 11px;

    }

}


/* =====================================================
   FORM STYLING
===================================================== */

#bb-contact-form {
    margin-bottom: 12px;
}

.bb-form-group {
    margin-bottom: 12px;
}

.bb-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #1f2937;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bb-form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bb-form-group input:focus {
    outline: none;
    border-color: #8c6cf5;
    box-shadow: 0 0 0 3px rgba(140, 108, 245, 0.1);
}

.bb-form-group input::placeholder {
    color: #9ca3af;
}


/* =====================================================
   GREETING TOOLTIP
===================================================== */

#bb-greeting-tooltip {
    position: absolute;

    right: 85px;
    bottom: 10px;

    background: linear-gradient(135deg, #8c6cf5, #7357e8);
    color: #ffffff;

    padding: 10px 14px;

    border-radius: 16px;

    box-shadow:
        0 8px 24px rgba(140, 108, 245, 0.3),
        0 0 20px rgba(140, 108, 245, 0.2);

    max-width: 200px;
    width: 250px;

    font-family: inherit;

    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;

    z-index: 999998;

    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

#bb-greeting-tooltip.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

#bb-greeting-text {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    min-height: auto;
    display: flex;
    align-items: center;

    /* Typing cursor */
    border-right: 2px solid #ffffff;
    padding-right: 4px;
    animation: typingCursor 0.7s infinite;
}

@keyframes typingCursor {
    0%, 49% {
        border-right-color: #ffffff;
    }
    50%, 100% {
        border-right-color: transparent;
    }
}

/* Arrow pointer - pointing right */
#bb-greeting-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;

    width: 14px;
    height: 14px;

    background: linear-gradient(135deg, #8c6cf5, #7357e8);

    border-radius: 2px;

    transform: translateY(-50%) rotate(45deg);

    box-shadow: 2px -2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
    #bb-greeting-tooltip {
        width: 180px;
        max-width: calc(100vw - 90px);
        right: 75px;
        padding: 10px 12px;
        min-height: 50px;
        box-sizing: border-box;
    }

    #bb-greeting-text {
        font-size: 13px;
        min-height: 30px;
        line-height: 1.4;
    }
}
