/* Root variables for colors */
:root {

    --s3-section-title-color: var(--bs-main);

}

#p_dosdonts,
#S3-Table-BoTable {
    padding: 0;
    margin: 0;
    padding-top: var(--s0-navbar-height);
    padding-bottom: 0rem;
    height: 110vh;
    font-size: 1rem;
    overflow: hidden;
}

/**************************************************8\
**** Section Header ****
********************************************/

#s3_SectionHeaderContainer {
    color: var(--s3-section-title-color);
    /* padding: 2rem; */
    display: flex;
    padding-bottom: 0;
    justify-content: center;
}


#s3_SectionHeaderTitle {
    font-size: 3.5rem;
    font-weight: bold;
    margin: 0;
}

#p_botbook {
    min-height: 85vh;
}

#howbot-wrapper {
    --howbot-wrapper-height: 170px;
}


.howbot-main {
    /* font-family: 'Outfit', sans-serif; */
    /* background-color: #eee; */
    display: flex;
    min-height: 85vh;
    color: #2D2A26;
    align-content: flex-start;
    justify-content: center;
}

#howbot-wrapper {
    width: 100%;
    min-width: 320px;
    max-width: 320px;
    height: 85vh;
    max-height: 95vh;
    background-color: transparent;
    position: relative;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    perspective: 1000px;
}

#howbot-opa-quote {
    white-space: pre-line;
}

/* --- 3D FLIP INFRASTRUCTURE --- */
.howbot-flip-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    justify-content: center;
}

.howbot-flip-container.flipped {
    transform: rotateY(180deg);
}

.howbot-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    overflow: hidden;
    background-color: #fff;
}

.howbot-card-front {
    z-index: 2;
}

.howbot-card-back {
    transform: rotateY(180deg);
    background-color: #1a1a1a;
    color: #fff;
}

/* --- SHARED STYLES --- */
.howbot-app-header {
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #f3f4f6;
    padding: 8px;
    /* z-index: 20; */
    background-color: #cfc7dc;
}

.howbot-scroll-content {
    flex: 1;
    /* overflow-y: auto; */
    display: flex;
    gap: 3px;
    padding-bottom: 40px;
    -ms-overflow-style: none;
    /* scrollbar-width: none; */
    text-align: left;
    flex-direction: column;
}

/* Back face can have more content; allow scrolling inside the card instead of clipping */
.howbot-card-back .howbot-scroll-content {
    overflow-y: auto;
}

.howbot-scroll-content::-webkit-scrollbar {
    display: none;
}

/* Soft separator under the Bot header (profile head) */
.howbot-card-front .howbor-profile-head {
    background: var(--bot-color-light, #2766ff75);
    position: relative;
}

/* --- IMAGES & AVATARS --- */
.howbot-avatar-btn {
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0.5;
    transform: scale(0.9);
    border: 2px solid transparent;
    overflow: hidden;
    /* Clips image */
    padding: 0;
    /* Remove padding for images */
}

.howbot-avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.howbot-avatar-btn.howbot-active {
    opacity: 1;
    transform: scale(1);
    border-color: #2D2A26;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#howbot-hero-icon-bg {
    /* overflow: hidden; */
    /* Clips hero image */
    padding: 0;
}

#howbot-hero-icon-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- FRONT FACE STYLES --- */
.howbot-chart-wrapper {
    position: relative;
    height: var(--howbot-wrapper-height);
    width: 100%;
}

.howbot-lever-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    justify-content: center;
}

.howbot-lever-btn {
    display: flex;
    align-items: center;
    gap: 3px;
    width: 100%;
    max-width: 100%;
    border: 1px solid rgba(17, 24, 39, 0.14);
    background: rgba(255, 255, 255, 0.9);
    color: #111827;
    border-radius: 999px;
    padding: 4px 7px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
    justify-content: space-between;
}

.howbot-lever-pill-label {
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: none;
    white-space: nowrap;
}

.howbot-lever-letter {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    font-weight: 900;
    flex: 0 0 auto;
}

.howbot-lever-score-pill {
    margin-left: 3px;
    min-width: 26px;
    height: 22px;
    padding: 0px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
}

.howbot-lever-score-pill--1 {
    background: #EF4444;
}

.howbot-lever-score-pill--2 {
    background: #F97316;
}

.howbot-lever-score-pill--3 {
    background: #EAB308;
}

.howbot-lever-score-pill--4 {
    background: #84CC16;
}

.howbot-lever-score-pill--5 {
    background: #22C55E;
}

.howbot-lever-pill-score {
    min-width: 18px;
    height: 18px;
    padding: 0px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

.howbot-lever-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(17, 24, 39, 0.24);
    background: rgba(255, 255, 255, 1);
}

.howbot-lever-btn.howbot-lever-btn--active {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.howbot-lever-btn.howbot-lever-btn--active .howbot-lever-letter {
    border-color: rgba(255, 255, 255, 0.35);
    /* background: rgba(255, 255, 255, 0.14); */
}

.howbot-lever-btn.howbot-lever-btn--active .howbot-lever-pill-score {
    background: #fff;
    color: #111827;
}

.howbot-lever-details {
    position: fixed;
    z-index: 9999;
    margin-top: 0;
    background: #F8F7F4;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 12px 12px 10px;
    text-align: left;
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.45);
}

.howbot-lower-overlay-area {
    /* height: 100%; */
    position: relative;
}

/* Full-overlay mode: covers the entire graph area box */
.howbot-lever-details.howbot-lever-details--overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: rgba(248, 247, 244, 0.97);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow: auto;
}

.howbot-lever-details.howbot-lever-details--overlay::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.howbot-lever-details-content {
    width: 100%;
    height: 100%;
    max-width: 340px;
    margin: 0 auto;
}

.howbot-lever-details-top {
    /* display: flex; */
    /* align-items: center; */
    /* justify-content: space-between; */
    /* gap: 10px; */
    position: absolute;
    /* margin-bottom: 6px; */
    right: 5px;
    top: 5px;
}

.howbot-lever-details-spacer {
    flex: 1;
}

.howbot-lever-details-heading {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: #111827;
}

.howbot-lever-details-info-btn {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(17, 24, 39, 0.18);
    background: rgba(255, 255, 255, 0.85);
    color: #111827;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.howbot-lever-details-info-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(17, 24, 39, 0.28);
}



.howbot-lever-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.howbot-lever-title strong {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.howbot-lever-score {
    font-size: 12px;
    font-weight: 900;
    color: #111827;
}

.howbot-lever-summary {
    font-size: 0.8rem;
    font-weight: 200;
    color: #000000;
    line-height: 1.25;
    margin-bottom: 12px;
}

.howbot-lever-evidence {
    display: grid;
    gap: 6px;
}

/* Evidence rows: icon + short title + short date (no box) */
.howbot-evidence-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    color: #111827;
}

.howbot-evidence-row--link {
    cursor: pointer;
}

.howbot-evidence-row--link .howbot-evidence-short {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

.howbot-evidence-row--link:hover .howbot-evidence-short {
    text-decoration-color: rgba(17, 24, 39, 0.95);
}

.howbot-evidence-row--link:focus {
    outline: none;
}

.howbot-evidence-row--link:focus-visible {
    outline: 2px solid rgba(17, 24, 39, 0.65);
    outline-offset: 2px;
    border-radius: 8px;
}

.howbot-evidence-short {
    color: blue;
    flex: 1;
    min-width: 0;
    font-size: 0.5rem;
    font-weight: 400;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.howbot-evidence-date {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 500;
    color: #6B7280;
    white-space: nowrap;
}

.howbot-evidence-type-icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid rgba(17, 24, 39, 0.14);
    background: rgba(17, 24, 39, 0.06);
    color: #111827;
    flex: 0 0 auto;
}

.howbot-evidence-type-icon--official {
    background: rgba(59, 130, 246, 0.10);
    border-color: rgba(59, 130, 246, 0.22);
}

.howbot-evidence-type-icon--third {
    background: rgba(16, 185, 129, 0.10);
    border-color: rgba(16, 185, 129, 0.24);
}

.howbot-evidence-legend {
    border: 1px solid rgba(17, 24, 39, 0.10);
    background: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    /* padding: 10px; */
    width: 100%;
    height: 100%;
    margin-bottom: 5px;
    /* display: grid; */
    /* gap: 8px; */
}

.howbot-evidence-legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
}

.howbot-evidence-legend-text {
    font-size: 11px;
    font-weight: 700;
    color: #374151;
    line-height: 1.25;
}

.howbot-evidence-legend-foot {
    font-size: 10px;
    font-weight: 700;
    color: #6B7280;
    padding: 5px;
    line-height: 1.25;
}

.howbot-skills-wrap {
    border: 1px solid rgba(17, 24, 39, 0.10);
    background: rgba(255, 255, 255, 0.70);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 12px;
}

.howbot-skills-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.howbot-skills-asof {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #374151;
}

.howbot-skills-score {
    font-size: 10px;
    font-weight: 900;
    color: #111827;
    white-space: nowrap;
}

.howbot-skills-legend {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.howbot-skills-list {
    display: grid;
    gap: 6px;
}

.howbot-skill-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.howbot-skill-name {
    font-size: 11px;
    font-weight: 600;
    color: #111827;
    line-height: 1.2;
    min-width: 0;
}

.howbot-skill-badge {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.01em;
    border: 1px solid rgba(17, 24, 39, 0.12);
    background: rgba(17, 24, 39, 0.04);
    color: #111827;
}

.howbot-skill-badge--yes {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.26);
}

.howbot-skill-badge--partial {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.30);
}

.howbot-skill-badge--no {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.26);
}

.howbot-skills-empty {
    font-size: 11px;
    font-weight: 600;
    color: #6B7280;
}

.howbot-spec-box {
    background: #F8F7F4;
    border-radius: 12px;
    padding: 4px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.howbot-hero-mini-box {
    background-color: #F8F7F4;
    padding: 6px 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}


/* Action Dock */
.howbot-action-dock {
    background-color: #2D2A26;
    border-radius: 16px;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 12px 24px -2px rgba(45, 42, 38, 0.3);
    width: 100%;
    gap: 6px;
}

.howbot-action-dock-label {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    gap: 6px;
}

.howbot-action-dock-icons {
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    padding-right: 4px;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10px, black 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 10px, black 100%);
}

.howbot-action-dock-icons::-webkit-scrollbar {
    display: none;
}

.howbot-dock-divider {
    width: 1px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 0 2px;
    flex-shrink: 0;
}

.howbot-dock-btn {
    width: 33px;
    height: 33px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    position: relative;
}

.howbot-dock-btn i {
    font-size: 16px;
}

.howbot-dock-btn:hover {
    background-color: #fff;
    color: #2D2A26;
    transform: translateY(-2px);
}

.howbot-dock-btn.howbot-primary {
    background-color: #fff;
    color: #2D2A26;
    border: 1px solid #fff;
}

.howbot-verified-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 14px;
    height: 14px;
    background-color: #10B981;
    border: 2px solid #2D2A26;
    border-radius: 50%;
    color: white;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.howbot-dock-btn.howbot-hidden-btn {
    display: none !important;
}

/* --- BACK FACE STYLES --- */
.howbot-burn-header {
    padding: 24px 24px 16px 24px;
    background: linear-gradient(135deg, #2D2A26 0%, #1a1a1a 100%);
    border-bottom: 1px solid #333;
}

.howbot-opa-verdict-dark {
    background-color: #262626;
    border-left: 4px solid #fff;
    padding: 14px;
    border-radius: 0 12px 12px 0;
    margin-bottom: 20px;
    position: relative;
}

.howbot-roast-card {
    background-color: #262626;
    border-left: 4px solid #F59E0B;
    padding: 14px;
    border-radius: 0 12px 12px 0;
    margin-bottom: 16px;
    position: relative;
}

.howbot-video-wrapper {
    position: relative;
    height: clamp(180px, 28vh, 260px);
    aspect-ratio: 9 / 16;
    width: auto;
    max-width: 100%;
    margin: 6px auto 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.howbot-video-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.howbot-fun-stat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    background: #262626;
    padding: 10px 12px;
    border-radius: 12px;
}

.howbot-fun-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* FAB */
.howbot-fab-flip {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #2D2A26;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    z-index: 50;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.howbot-fab-flip:active {
    transform: scale(0.9) rotate(180deg);
}

.howbot-fab-flip i {
    font-size: 20px;
    transition: transform 0.5s;
}

.howbot-flip-container.flipped+.howbot-fab-flip {
    background-color: #fff;
    color: #2D2A26;
}

.howbot-flip-container.flipped+.howbot-fab-flip i {
    transform: rotate(180deg);
}


@media(min-width: 425px) {
    #howbot-wrapper {
        min-width: 380px;
        max-width: 380;
    }
}

@media(min-width: 600px) {
    #howbot-wrapper {
        min-width: 500px;
        max-width: 500px;
    }
}