@import url('https://fonts.googleapis.com/css2?family=Oxygen:wght@300;400;700&family=Sora:wght@100..800&display=swap');

.bf-canvas-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: relative;
    overflow-x: hidden;
}

.bf-canvas-response {
    margin-top: -6rem; /* overlap visually without layout break */
    padding: 2rem;
    border-radius: 2rem 2rem 0 0;
    background-color: #f9f9f9;
    font-size: 1.6rem;
    line-height: 1.7;
    transition: opacity 0.8s ease, height 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    color: #333;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 18rem;
    z-index: 3;
	border-top-left-radius: 100px;
    border-top-right-radius: 100px;
}

.bf-canvas-input {
    font-size: 22px;
    line-height: 1.2;
    padding: 2px 0 3px;
    margin: 0;
    border: none;
    box-sizing: content-box;
    resize: none;
    overflow: hidden;
    height: auto;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    min-height: 1.2em;
}

.bf-canvas-input-mirror {
    visibility: hidden;
    position: absolute;
    left: -9999px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    top: 0;
    left: 0;
    z-index: -1;
}



.bf-canvas-input:hover,
.bf-canvas-input:focus {
    color: #fff; /* full white when hovered or focused */
    background: transparent;
}

.bf-canvas-submit,
.bf-canvas-submit:hover {
    background: transparent;
    position: absolute;
    cursor: pointer;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.bf-canvas-submit:hover .input-icon rect {
    fill: #d020b2; /* Change background color of circle on hover */
}

/* Loading indicator */
.bf-canvas-loading {
    display: inline-block;
    margin: 20px auto;
    width: 50px;
    text-align: center;
}

.bf-canvas-loading div {
    width: 10px;
    height: 10px;
    background-color: var(--bf-main-color, #c044d1);
    border-radius: 100%;
    display: inline-block;
    animation: bf-canvas-bouncedelay 1.4s infinite ease-in-out both;
    margin: 0 2px;
}

.bf-canvas-loading .bounce1 {
    animation-delay: -0.32s;
}

.bf-canvas-loading .bounce2 {
    animation-delay: -0.16s;
}

@keyframes bf-canvas-bouncedelay {
    0%,
    80%,
    100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.bf-citation-wrapper {
    position: relative;
    margin-top: 1em;
    padding: 0 48px; /* space for outer arrows */
}
.bf-citation-carousel {
    display: flex;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    overflow-x: auto;
    touch-action: auto;
    overscroll-behavior-x: contain;
}

.bf-citation-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.bf-citation-card {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 auto;
    justify-content: space-between;
    align-items: stretch;
    scroll-snap-align: start;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    user-select: none;
    width: 100%;
    max-width: 300px;
}

.bf-citation-text {
    flex: 1;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.bf-citation-text.no-image {
    max-width: 100%;
}

.bf-citation-image {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f6f6;
    height: 180px;
}

.citation-title {
    font-size: 0.95rem;
    margin: 0;
    font-weight: 600;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--gray, #1e1e1e);
    font-family: 'Sora', sans-serif, serif !important;
    font-size: 20px;
}

.citation-description {
    font-size: 0.8rem;
    color: #555;
    margin: 6px 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.citation-link {
    font-size: 0.75rem;
    color: #0073aa;
    text-decoration: none;
    margin-top: auto;
}

.bf-citation-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.carousel-arrow,
.carousel-arrow:hover {
    position: absolute;
    top: 40%;
    transform: translateY(-40%);
    cursor: pointer;
    z-index: 10;
    background: transparent;
    padding: 0;
}

.left-arrow {
    left: -16px; /* pushes outside container */
}

.right-arrow {
    right: -16px;
}

.bf-canvas-placeholder {
    text-align: center;
    font-family: 'Sora', sans-serif, serif;
    font-size: clamp(42px, 5vw, 100px);
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    background: linear-gradient(
        180deg,
        var(--pink, #f735f5) 18.37%,
        var(--blue, #00b7e5) 81%,
        var(--blue, #00b7e5) 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: 20px;
}

.gradient-border-box {
    padding: 1px;
    border-radius: 80px;
    z-index: 1;
}

.gradient-border-box::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px; /* border thickness */
    border-radius: 80px;
    background: linear-gradient(
        90deg,
        var(--pink, #f735f5) 18.37%,
        var(--blue, #00b7e5) 100%
    );
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);

    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

.bf-canvas-input:focus,
.bf-canvas-input {
    border: none;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 30px 80px 30px 50px;
    margin-bottom: 250px;
    background: rgba(255, 255, 255, 0.1);
}

.input-icon {
    width: 50px;
}

.entry-header {
    display: none;
}

.bf-canvas-entry-title {
    color: var(--white, #fff);
    text-align: center;
    /* subheading */
    font-family: 'Oxygen', sans-serif, serif !important;
    font-size: 26px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin: 0;
    padding-bottom: 20px;
    padding-top: 25px;
}

/* Input Section: black background */
.bf-canvas-input-container {
    background: black;
    position: relative;
    padding: 10rem 0 2rem;
    z-index: 1;
}

/* Gradient strip between black and white */
.bf-gradient-strip {
    position: absolute;
    height: 12rem;
    width: 100%;
    opacity: 0.6;
    background: linear-gradient(
        90deg,
        #f735f5 18.37%,
        #00b7e5 81%,
        #00b7e5 100%
    );
    filter: blur(4rem);
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
    bottom: 0;
    padding: 0;
    margin: 0;
}

/* Response Section: white with top border radius */

.bf-canvas-response-content {
    padding-top: 60px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    border-bottom: 2px solid rgba(30, 30, 30, 0.15);
    padding-bottom: 60px; /* optional spacing */
    margin-bottom: 60px;
}

.bf-canvas-related-content {
    display: none;
    border-bottom: 2px solid rgba(30, 30, 30, 0.15);
    padding-bottom: 60px; /* optional spacing */
    margin-bottom: 60px;
}

.bf-canvas-response-content.visible {
    opacity: 1;
}

.bf-canvas-response-content img {
    border-radius: 20px;
}

.bf-canvas-specific-question .input-wrapper {
    margin-bottom: 100px;
    color: var(--gray, #1e1e1e);
}
.bf-canvas-specific-question .input-wrapper textarea {
    color: var(--gray, #1e1e1e);
}
.bf-canvas-specific-question p {
    font-size: 18px;
    padding-bottom: 25px;
    padding-top: 15px;
}

.bf-canvas-specific-question {
    display: none;
}
.bf-canvas-related-content h2 {
    padding-bottom: 25px;
}

.citation-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    width: 300px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #ccc;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.arrow-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1e1e1e;
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.arrow-circle svg {
    width: 100%;
    height: 100%;
}

#bf-canvas-response p {
    margin-bottom: 10px;
    font-size: inherit;
    color: inherit;
    line-height: inherit;
}

#bf-canvas-response img {
    max-width: 100%;
    height: auto;
}

#bf-canvas-response ul {
    margin-left: 20px;
}
#bf-canvas-response ul li {
    list-style: disc;
    margin-bottom: 5px;
    font-size: inherit;
    color: inherit;
    line-height: inherit;
}

@media (max-width: 768px) {
    .bf-canvas-response {
        font-size: 1.2rem;
        min-height: 14rem;
        margin-top: -3rem;
        border-top-left-radius: 50px !important;
        border-top-right-radius: 50px !important;
    }

    .bf-canvas-submit, #bf-canvas-submit:hover {
        right: 15px!important;
    }

    .bf-gradient-strip {
        height: 8rem;
        filter: blur(2rem);
    }

    .bf-canvas-input-container {
        padding-top: 8rem;
    }

    .gradient-border-box {
        border-radius: 50px;
        padding: 25px 70px 25px 30px;
    }
    .gradient-border-box::before {
        border-radius: 50px;
    }

    .bf-citation-wrapper {
        padding: 0 30px;
    }
}

@media (max-width: 480px) {
    .gradient-border-box {
        border-radius: 30px;
    }
    .gradient-border-box::before {
        border-radius: 30px;
    }
}
