@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    /* color */
    --backgroung-white: #FFFFFF;
    --white-color: #fff;
    --primary-color: #39A5F3;
    --secondary-color: #348BDB;
    --gray-color: #B1B1B1;
    --dark-color: #23262F;
    --dark-gray-color: #8E9295;
    --yellow-color: #fac53e;
    --light-gray-color: #D7D7D7;
    --black-color: #121212;
    --gray-background: #F9F9F9;
    --text-background-color: #EFEFEF;
    --text-color: #A0A0A5;


    /* border radius */
    --border-radius-5: 5px;
    --border-radius-8: 8px;
    --border-radius-10: 10px;

    /* box shadow */
    --box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);


    /* transition */
    --transition-200: all 200ms ease;
    --transition-300: all 300ms ease;
}

/* ── UNIFIED TYPE SYSTEM ── */
:root {
    --font-family: 'Plus Jakarta Sans', sans-serif;

    /* Scale */
    --text-2xs:  10px;   /* date group labels: "TODAY", "YESTERDAY" */
    --text-xs:   11px;   /* disclaimer: "AI-generated, for reference only" */
    --text-sm:   13px;   /* sidebar chat titles, copy tooltip */
    --text-base: 15px;   /* ALL chat messages, body text, menus */
    --text-md:   16px;   /* modal titles, section labels */
    --text-lg:   18px;   /* page-level headings */
    --text-xl:   22px;   /* empty state h1 */

    /* Weights */
    --weight-normal:   400;
    --weight-medium:   500;
    --weight-semibold: 600;
    --weight-bold:     700;

    /* Line heights (always unitless) */
    --leading-tight:   1.35;  /* buttons, labels, short strings */
    --leading-normal:  1.55;  /* chat messages */
    --leading-relaxed: 1.75;  /* long AI responses */

    /* Letter spacing */
    --tracking-tight:  -0.1px;
    --tracking-normal:  0px;
    --tracking-wide:    0.4px;
    --tracking-widest:  1.2px;  /* uppercase labels only */
}


/* WELCOME SECTION */
.welcome_container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    background-color: var(--backgroung-white);
}

.welocome_main {
    text-align: center;
    height: 100%;
    border-radius: var(--border-radius-5);
    padding-right: 0.8rem;
    padding-left: 0.8rem;
    padding-bottom: 1rem;
}

.welocome_main .welcome_button_box {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.welcome_button_box .login_btn {
    font-size: 18px;
    font-weight: 700;
    line-height: 28.8px;
    letter-spacing: 0.20000000298023224px;
    background-color: var(--primary-color);
    text-decoration: none;
    color: var(--white-color);
    cursor: pointer;
    border: none;
    border-radius: 1.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    transition: var(--transition-200);
}

.welcome_button_box .login_btn:hover {
    opacity: .7;
}

.welcome_button_box .sign_up_btn {
    font-size: 18px;
    font-weight: 700;
    line-height: 28.8px;
    letter-spacing: 0.20000000298023224px;
    margin-top: 1.5rem; 
    background-color: var(--backgroung-white);
    color: var(--gray-color);
    cursor: pointer;
    border: none;
    border: 1px solid var(--primary-color);
    border-radius: 1.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    transition: var(--transition-200);
}

.welcome_button_box .sign_up_btn:hover {
    opacity: .8;
}
/* WELCOME SECTION ENDS HERE */



/* TESTIMONIAL SECTION STARTS HERE */
.testimonial_area {
    margin-top: 1rem;
}

.testimonial_skip_box {
    text-align: right;
    padding-right: 2rem;
}
  
.testimonial_skip_box a {
    font-size: 18px;
    font-weight: 600;
    line-height: 27px;
    cursor: pointer;
    color: var(--primary-color);
    text-decoration: none;
}

.testimonial_wrapper {
    max-width: 400px;
    margin-inline: auto;
    padding-inline: 1rem;
}

.testimonial {
    position: relative;
} 

.testimonial_card {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    text-align: center;
    gap: 48px;
}

.roobo_image {
    width: 200px;
    height: auto;
    object-fit: cover;
}

.unlock_text_box h1 {
    font-size: 33.9px;
    font-weight: 700;
    line-height: 50.85px;
    letter-spacing: -0.02em;
    color: var(--dark-color);
}
  
.unlock_text_box p {
    font-size: 16.3px;
    font-weight: 300;
    line-height: 28.94px;
    color: var(--dark-gray-color);
}

.testimonial_card_group {
    position: relative;
}

.indicator {
    position: absolute;
    top: 51%;
    left: 45%;
    z-index: 1;
}

.indicator_main {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 5px;
}

.indicator .indicator_main div {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #d7d7d7;
    cursor: pointer;
}

.indicator .indicator_main div.active {
    background-color: #f2c94c;
}
  
.testimonial_navigator {
   text-align: center;
   display: flex;
   align-items: center;
   justify-content: center;
   margin-top: 3rem;
}

.testimonial_navigator .testimonial_arrow_box {
    box-shadow: var(--box-shadow);
    background-color: var(--backgroung-white);
    padding: 0.8rem 1.5rem 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.3rem;
    border-radius: var(--border-radius-8);
    position: relative;
}

.testimonial_navigator .testimonial_arrow_box::before {
    content: "";
    position: absolute;
    top: 0.7rem;
    bottom: 0.4rem;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 1.3rem;
    background-color: var(--dark-gray-color);
}

.testimonial_navigator .testimonial_arrow_box button {
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-200);
}

.testimonial_navigator .testimonial_arrow_box button.inactive {
    opacity: 0.5;
    pointer-events: none;
}

.testimonial_navigator .testimonial_arrow_box button span:hover {
    color: var(--primary-color);
}
/* TESTIMONIAL SECTION ENDS HERE */



/* HISTORY SECTION STARTS HERE */
.history_overall_container {
    width: 100%;
    height: 100%;
}

.history_main {
    width: 100%;
    height: 100%;
    display: none;
    background-color: var(--backgroung-white);
}

.history_main .history_contents_box {
    padding: 0.5rem 1rem 0.7rem;
}

.history_main .history_contents_box .history_head {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
}

.history_contents_box .history_head h4 {
    font-size: 20px;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: 0.2px;
    color: var(--black-color);
}

.history_contents_box .history_head .svg_box svg {
    cursor: pointer;
}

.history_contents_box .search_container {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 1.3rem;
    padding-bottom: 1rem;
}

.history_contents_box .search_container .search_box {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.4rem;
    background-color: var(--gray-background);
    padding: 0.3rem 0.4rem;
    border-radius: var(--border-radius-8);
    width: 90%;
}

.history_contents_box .search_container .search_box input {
    border: none;
    background: none;
    outline: none;
    font-size: 18px;
    color: var(--dark-color);
    width: 100%;
}

.history_contents_box .search_container button {
    background-color: var(--secondary-color);
    border: none;
    padding: 0.6rem 0.8rem;
    border-radius: var(--border-radius-8);
    cursor: pointer;
    transition: var(--transition-200);
}

.history_contents_box .search_container button:hover {
    opacity: .8;
}

.history_contents_box .texts_main {
    margin-top: 1.7rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    height: 77vh;
    padding-bottom: 1rem;
}

.history_contents_box .texts_main::-webkit-scrollbar {
    display: none;
}

.history_contents_box .texts_main h4 {
    margin-bottom: 0.6rem;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    color: var(--dark-color);
}

.text-box {
    border-radius: var(--border-radius-5);
    padding: 0.6rem 0.4rem 0.6rem 0.6rem;
    text-align: left;
    margin-bottom: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor:pointer;
}

.text-box p {
    outline: none;
    border: none;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    color: var(--text-color);
    letter-spacing: 0.2PX;
    cursor:pointer;
}

.history_bottom {
    border-top: 1px solid var(--gray-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    bottom: 0;
    width: 100%;
    left: 0;
    background-color: var(--backgroung-white);
    padding-top: 0.8rem;
    padding-left: 1.8rem;
    padding-right: 1.8rem;
}

.history_bottom .icon-container svg {
    position: relative;
    cursor: pointer;
}

.history_bottom .icon-container svg.active path {
    fill: black;
}

.history_bottom .icon-container {
    position: relative;
    padding-bottom: 0.7rem;
}

.history_bottom .icon-container .circle {
    position: absolute;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--black-color);
    display: none;
    transform: translateX(100%);
}

.history_bottom svg.active + .circle {
    display: block; 
}
/* HISTORY SECTION ENDS HERE */





/* ASK BOT SECTION STARTS */
.ask_bot_overall_container {
    width: 100%;
    height: 100%;
}

.ask_bot_main {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    padding: 0rem 1rem 0.7rem;
    position: relative;
}

.ask_bot_top-bar {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    position: sticky;
    padding-top: 0.5rem;
    top: 0;
    z-index: 9999;
    background-color: var(--backgroung-white);
}

.delete_conte {
    cursor:pointer;
    position: absolute;
    right: 0.3rem;
    top: 5.6rem;
    display: none;
}

.delete_conte .delete_main {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.3rem;
    background-color: var(--backgroung-white);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius-5);
    padding: 0.6rem;
    cursor: pointer;
}

.delete_conte .delete_main img {
    width: 18px;
    height: 18px;
}

.delete_conte .delete_main span {
    font-size: 16px;
    font-weight: 500;
    line-height: 27px;
    letter-spacing: 0.13999329507350922px;
    color: #000000;
}

.rename_conte {
    cursor:pointer;
    position: absolute;
    right: 0.3rem;
    top: 2.5rem;
    display: none;
}

.rename_conte .rename_main {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.3rem;
    background-color: var(--backgroung-white);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius-5);
    padding: 0.6rem;
    cursor: pointer;
}

.rename_conte .rename_main img {
    width: 18px;
    height: 18px;
}

.rename_conte .rename_main span {
    font-size: 16px;
    font-weight: 500;
    line-height: 27px;
    letter-spacing: 0.13999329507350922px;
    color: #000000;
}

.logout_conte {
    position: absolute;
    right: 0.3rem;
    top: 8.8rem;
    display: none;
    cursor:pointer;
}

.logout_conte .logout_main {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.3rem;
    background-color: var(--backgroung-white);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius-5);
    padding: 0.6rem;
    cursor: pointer;
}

.logout_conte .logout_main img {
    width: 18px;
    height: 18px;
}

.logout_conte .logout_main span {
    font-size: 16px;
    font-weight: 500;
    line-height: 27px;
    letter-spacing: 0.13999329507350922px;
    color: #000000;
}

.ask_bot_top-bar a {
    text-decoration: none;
}

.ask_bot_top-bar .ask_bot svg {
    cursor: pointer;
}

.ask_bot_content {
    text-align: center;
}

.ask_bot_content h1 {
    font-size: 18px;
    font-weight: 700;
    line-height: 28.8px;
    color: #000000;
    letter-spacing: 0.2px;
}

.send_message_box {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 0.5rem;
    background-color: white;
}

.chatarea_container {
    width: 100%;
    margin-top: 2rem;
    margin-bottom: 3rem;
    height: 100%;
    display: none;
    position: relative;
    overflow-y: auto;
}

.chatarea_container::-webkit-scrollbar {
    display: none;
}

.chatarea_main_box {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.chatarea_main_box .chatarea_textbox1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

.chatarea_main_box .chatarea_textbox1 p {
    font-size: 18px;
    font-weight: 400;
    line-height: 22px;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    text-align: left;
    color: var(--text-color);
}

.chatarea_main_box .chatarea_textbox1 .image_2 {
    cursor: pointer;
}

.chatarea_main_box .chatarea_textbox1 .image_2:hover + .edit_popup_cont {
    display: block;
}

.chatarea_textbox1 .edit_popup_cont {
    position: absolute;
    right: 0;
    top: 3rem;
    display: none;
}

.chatarea_textbox1 .edit_popup_cont span {
    background-color: var(--yellow-color);
    border-radius: var(--border-radius-5);
    padding: 0.6rem 0.6rem;
    position: relative;
    font-size: 16px;
    font-weight: 500;
    line-height: 27px;
    letter-spacing: 0.13999329507350922px;
    color: #000000;
}

.chatarea_textbox1 .edit_popup_cont span::after {
    content: '';
    width: 1.2rem;
    height: 1.2rem;
    background: var(--yellow-color);
    position: absolute;
    left: 50%;
    top: 1.2%; 
    transform: translate(-50%, -50%) rotate(45deg); 
    z-index: 1; 
}

.response_box {
    background-color: #f7f7f7;
    padding: 1rem 1rem 2rem;
    margin-top: 2rem;
}

.response_box .response_chat {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    position: relative;
}

.response_chat .share_copy_box img,
.response_chat .share_copy_box svg {
    cursor: pointer;
}

.regenerate-svg-box img {
    width: 27px;
    height: 27px;
}

.response_chat .share_copy_box .share_image_box {
    position: relative;
}

.response_chat .share_copy_box {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1rem;
    position: relative;
}

.regenerate-svg_p_box {
    position: absolute;
    right: 1.8rem;
    top: 3.3rem;
    display: none;
}

.regenerate-svg_p_box span,
.regenerate-copy_p_box span {
    background-color: var(--yellow-color);
    border-radius: var(--border-radius-5);
    padding: 0.6rem 0.6rem;
    position: relative;
    font-size: 16px;
    font-weight: 500;
    line-height: 27px;
    letter-spacing: 0.13999329507350922px;
    color: #000000;
}

.regenerate-svg_p_box span::after {
    content: '';
    width: 1.2rem;
    height: 1.2rem;
    background: var(--yellow-color);
    position: absolute;
    left: 50%;
    top: 1.2%; 
    transform: translate(-50%, -50%) rotate(45deg); 
    z-index: 1; 
}

.regenerate-copy_p_box {
    position: absolute;
    top: 3.3rem;
    right: -0.7rem;
    display: none;
}

.regenerate-copy_p_box span::after {
    content: '';
    width: 1.2rem;
    height: 1.2rem;
    background: var(--yellow-color);
    position: absolute;
    left: 50%;
    top: 1.2%; 
    transform: translate(-50%, -50%) rotate(45deg); 
    z-index: 1; 
}

.share_image_box .share_dropdown_contain {
   position: absolute;
   right: 0.1rem;
   top: 2rem;
   display: none;
}

.share_image_box .share_dropdown_contain.show {
    display: block;
}

.share_dropdown_contain .share_dropdown_main {
    border: 1px solid  var(--dark-color);
    border-radius: var(--border-radius-5);
    width: 8rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: var(--backgroung-white);
}

.share_dropdown_contain .share_dropdown_main a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px;
    font-size: 16px;
    font-weight: 300;
    line-height: 17.55px;
    letter-spacing: 0.3px;
    color: #343437;
    transition: var(--transition-200);
}

.share_dropdown_contain .share_dropdown_main a:hover {
    background-color: var(--dark-gray-color);
    color: var(--white-color);
}

.share_dropdown_contain .share_dropdown_main a .twitter_svg {
    width: 14px;
    height: 14px;
}

.chatarea_main_box .response_text_box {
    margin-top: 1rem;
}

.chatarea_main_box .response_text_box p {
    font-size: 18px;
    font-weight: 500;
    line-height: 27px;
    letter-spacing: 0.13999329507350922px;
    text-align: left;
    color: #494949;
}

.response_text_box ol,
.response_text_box ul {
  padding-left: 1.5rem;
  list-style-position: inside;
  margin-left: 0;              
}

.response_text_box li {
  word-wrap: break-word;
  overflow-wrap: break-word;
}


.chatarea_container .regenerate_response_box button span {
    font-size: 16px;
    font-weight: 500;
    line-height: 20.75px;
    letter-spacing: 0.3px;
    color: #000000;
}

.send_message_box form .inputs-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    border: 1px solid var(--text-color);
    border-radius: var(--border-radius-5);
    background-color: var(--backgroung-white);
    width: 100%;
    padding: 0.9rem 1rem;
    gap: 0.6rem;
}

.send_message_box form .inputs-box textarea {
    border: none;
    outline: none;
    resize: none;
    width: 100%;
    font-size: 18px;
    font-size: 700;
    color: var(--black-color);
}

.send_message_box form .inputs-box textarea::placeholder {
    color: #A3A3A8;
}

.send_message_box form .inputs-box button {
    background: none;
    cursor: pointer;
    padding-top: 0.3rem;
    border: none;
}
/* ASK BOT SECTION ENDS HERE */




/* MEDIA STYLES GOES HERE */
@media (max-width: 425px) {
    .welocome_main {
        width: 100%;
    }

    .history_contents_box .texts_main {
        padding-bottom: 1.6rem;
        overflow-y: auto;
        height: 77vh;
    }
}

@media (max-width: 320px) {   
    .unlock_text_box h1 {
        font-size: 30px;
    }   
}

/* Full‑screen translucent overlay */
.rename-modal-overlay, .delete-modal-overlay, .logout-modal-overlay  {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    }
    .rename-modal-overlay.hidden, .delete-modal-overlay.hidden, .logout-modal-overlay.hidden {
    display: none;
}

/* Modal box */
.modal {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    width: 320px;
    max-width: 90%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    text-align: center;
}

.modal__title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    color: #333;
}

.modal__input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
}

.modal__actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.btn--primary {
    background-color: #317db9;
    color: #fff;
}
.btn--primary:hover {
    background-color:rgb(10, 65, 107);
}
.btn--secondary {
    background-color: #f7f7f7;
}
.btn--secondary:hover {
    background-color: #5a6268;
    color: #ffff;
}


/* ═══════════════════════════════════════════
   PROCERTS AI — CHAT UI REDESIGN
   Add these at the bottom of styles.css
═══════════════════════════════════════════ */

/* ── Entrance animation for new message blocks ── */
@keyframes msgIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes thinkPulse {
    0%, 80%, 100% { transform: scale(0.55); opacity: 0.35; }
    40%            { transform: scale(1);    opacity: 1;    }
}

.chatarea_main_box {
    animation: msgIn 0.32s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    gap: 0;
}

/* ── USER BUBBLE ── */
.chatarea_textbox1 {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 0;
    padding: 0 0.1rem;
    margin-bottom: 0.4rem;
    position: relative;
}

/* Hide the user avatar and edit icon for a cleaner bubble layout */
.chatarea_textbox1 > img:first-child,
.chatarea_textbox1 .image_2 {
    display: none;
}

.chatarea_textbox1-text {
    background: linear-gradient(135deg, #2572a8 0%, #39A5F3 100%) !important;
    color: #ffffff !important;
    border-radius: 20px 20px 4px 20px !important;
    padding: 0.75rem 1.1rem !important;
    max-width: 80% !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    letter-spacing: 0.1px !important;
    box-shadow: 0 4px 18px rgba(57, 165, 243, 0.28);
    word-break: break-word;
    white-space: pre-wrap;
}

/* ── AI RESPONSE CARD ── */
.response_box {
    background: #ffffff !important;
    border-radius: 16px !important;
    border: 1px solid #deedf9 !important;
    border-left: 3px solid #39A5F3 !important;
    box-shadow: 0 2px 18px rgba(49, 125, 185, 0.07), 0 1px 4px rgba(0,0,0,0.04) !important;
    padding: 1rem 1.1rem 1.1rem !important;
    margin-top: 0.6rem !important;
    margin-bottom: 1.4rem !important;
    transition: box-shadow 0.2s ease;
}

.response_box:hover {
    box-shadow: 0 6px 24px rgba(49, 125, 185, 0.13), 0 2px 6px rgba(0,0,0,0.06) !important;
}

/* Header row inside AI card */
.response_box .response_chat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #eef4fa;
    margin-bottom: 0.75rem;
    position: relative;
}

/* AI avatar — small branded circle */
.response_box .response_chat > img:first-child {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid #d0e8f8;
    object-fit: cover;
}

/* Copy button */
.copy_image_box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #deedf9;
    background: #f5faff;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.copy_image_box:hover {
    background: #e4f2fc;
    border-color: #39A5F3;
    transform: scale(1.08);
}

.copy_image_box img {
    width: 14px;
    height: 14px;
    opacity: 0.75;
}

.copy_image_box:hover img {
    opacity: 1;
}

/* Copy tooltip */
.regenerate-copy_p_box {
    position: absolute;
    top: -2.4rem;
    right: 0;
    display: none;
    z-index: 20;
}

.regenerate-copy_p_box span {
    background: #1c2b3a !important;
    color: #ffffff !important;
    border-radius: 7px !important;
    padding: 5px 11px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0,0,0,0.18);
}

.regenerate-copy_p_box span::after {
    background: #1c2b3a !important;
    width: 8px !important;
    height: 8px !important;
    top: auto !important;
    bottom: -4px;
    left: 50%;
    transform: translate(-50%, 0) rotate(45deg) !important;
}

/* AI response body text */
.response_text_box p.answer_chat {
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.75 !important;
    color: #2c3e50 !important;
    letter-spacing: 0.05px !important;
}

/* Lists inside AI answer */
.response_text_box ol,
.response_text_box ul {
    padding-left: 1.4rem;
    margin: 0.5rem 0;
}

.response_text_box li {
    margin-bottom: 0.35rem;
    line-height: 1.65;
    font-size: 15px;
    color: #2c3e50;
}

.response_text_box p + p {
    margin-top: 0.6rem;
}

/* Code blocks inside AI answer */
.response_text_box pre {
    background: #f0f6fc;
    border: 1px solid #d5e8f7;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    overflow-x: auto;
    margin: 0.8rem 0;
    font-size: 13px;
    line-height: 1.6;
}

.response_text_box code {
    background: #e8f3fc;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 13px;
    color: #1a6fa0;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ── THINKING / TYPING INDICATOR ── */
.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0.25rem 0;
}

.thinking-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #39A5F3;
    animation: thinkPulse 1.3s infinite ease-in-out;
}

.thinking-dot:nth-child(2) { animation-delay: 0.18s; }
.thinking-dot:nth-child(3) { animation-delay: 0.36s; }

/* ── SEND INPUT BOX ── */
.send_message_box {
    padding: 0.5rem 1rem 0.85rem !important;
    background: linear-gradient(to top, #ffffff 88%, rgba(255,255,255,0)) !important;
}

.send_message_box form .inputs-box {
    border-radius: 28px !important;
    border: 1.5px solid #cce1f4 !important;
    box-shadow: 0 4px 28px rgba(49, 125, 185, 0.11), 0 1px 4px rgba(0,0,0,0.05) !important;
    background: #ffffff !important;
    padding: 0.65rem 0.65rem 0.65rem 1.1rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    align-items: flex-end !important;
    gap: 0.5rem !important;
}

.send_message_box form .inputs-box:focus-within {
    border-color: #39A5F3 !important;
    box-shadow: 0 4px 28px rgba(57, 165, 243, 0.2), 0 1px 4px rgba(0,0,0,0.05) !important;
}

.send_message_box form .inputs-box textarea {
    font-size: 15px !important;
    font-weight: 400 !important;
    min-height: 24px;
    max-height: 130px;
    overflow-y: auto;
    line-height: 1.55;
    color: #1a2533 !important;
    align-self: center;
}

.send_message_box form .inputs-box textarea::placeholder {
    color: #aab8c5 !important;
    font-size: 15px;
}

/* Send button — glowing gradient circle */
.inbox-send-btn {
    background: linear-gradient(135deg, #2572a8 0%, #39A5F3 100%) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    padding: 0 !important;
    padding-top: 0 !important;
    box-shadow: 0 3px 14px rgba(57, 165, 243, 0.45) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
    flex-shrink: 0;
    cursor: pointer;
}

.inbox-send-btn:hover {
    box-shadow: 0 5px 20px rgba(57, 165, 243, 0.6) !important;
    transform: scale(1.07) !important;
}

.inbox-send-btn:active {
    transform: scale(0.95) !important;
}

.inbox-send-btn svg path {
    fill: #ffffff !important;
}

.send_message_box small {
    font-size: 11px !important;
    color: #b8c8d6 !important;
    margin-top: 0.4rem;
    letter-spacing: 0.1px;
}

/* ── SCROLL-DOWN BUTTON ── */
#down-icon {
    background: linear-gradient(135deg, #317db9, #39A5F3) !important;
    box-shadow: 0 4px 14px rgba(57, 165, 243, 0.4) !important;
    width: 36px !important;
    height: 36px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    border: none !important;
}

#down-icon:hover {
    transform: translateY(2px) !important;
    box-shadow: 0 2px 8px rgba(57, 165, 243, 0.35) !important;
}

#down-icon svg path {
    fill: #ffffff;
}

/* ── STOP BUTTON ── */
#stop-btn {
    background: linear-gradient(135deg, #2572a8 0%, #39A5F3 100%);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 0;
    box-shadow: 0 3px 14px rgba(57, 165, 243, 0.45);
    cursor: pointer;
    flex-shrink: 0;
    animation: pulse-ring 1.4s ease-out infinite;
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(57, 165, 243, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(57, 165, 243, 0); }
    100% { box-shadow: 0 0 0 0 rgba(57, 165, 243, 0); }
}

/* ── EMPTY STATE (before first message) ── */
.ask_bot_content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 0.5rem;
}

.ask_bot_content h1 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #8da8bf !important;
    letter-spacing: 1.5px !important;
}

.ask_bot_content .logo {
    width: 64px;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}






/* ═══════════════════════════════════════════════════════
   PROCERTS AI — UNIFIED SIDEBAR (matches chat design)
   Replaces the dark navy sidebar CSS entirely
═══════════════════════════════════════════════════════ */

/* ── Sidebar: fixed drawer, not full-screen ── */
.history_main {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 290px;
    max-width: 88vw;
    height: 100vh;
    z-index: 1100;
    display: flex !important;        /* always in DOM */
    flex-direction: column;
    background: #ffffff;
    border-right: 1px solid #deedf9;
    box-shadow: 4px 0 32px rgba(49, 125, 185, 0.1), 2px 0 8px rgba(0, 0, 0, 0.05);
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.32s ease;
    overflow: hidden;
}

.history_main.sidebar-open {
    transform: translateX(0);
    box-shadow: 6px 0 40px rgba(49, 125, 185, 0.14), 3px 0 12px rgba(0, 0, 0, 0.08);
}

/* ── Backdrop overlay (behind drawer, in front of chat) ── */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(12, 30, 48, 0.38);
    z-index: 1099;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.32s ease;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

/* ── Inner content box ── */
.history_contents_box {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 !important;
}

/* ── Sticky header — matches chat top-bar feel ── */
.history_contents_box > div[style*="sticky"] {
    background: #ffffff !important;
    padding: 0 !important;
    border-bottom: 1px solid #eef5fb !important;
    flex-shrink: 0;
}

/* ── Header row ── */
.history_head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.9rem 1.1rem 0.65rem !important;
}

.history_head h3 {
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    text-transform: none !important;
    color: #1a2e40 !important;
    margin: 0 !important;
}

/* ── Close button — same style as copy button in chat ── */
#close-sidebar {
    color: #8daecc !important;
    cursor: pointer;
    width: 30px !important;
    height: 30px !important;
    padding: 5px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}

#close-sidebar:hover {
    color: #39A5F3 !important;
    background: #e4f2fc !important;
    border-color: #deedf9 !important;
}

/* ── Search row ── */
.search_container {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.45rem 1rem 0.9rem !important;
    margin-top: 0 !important;
}

/* ── Search box — mirrors the chat input pill ── */
.history_contents_box .search_box {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    flex: 1 !important;
    background: #f5faff !important;
    border: 1.5px solid #d8e8f5 !important;
    border-radius: 22px !important;
    padding: 0.48rem 0.9rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.history_contents_box .search_box:focus-within {
    border-color: #39A5F3 !important;
    box-shadow: 0 0 0 3px rgba(57, 165, 243, 0.1) !important;
    background: #ffffff !important;
}

.history_contents_box .search_box img {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0;
    opacity: 0.45;
    transition: opacity 0.2s;
}

.history_contents_box .search_box:focus-within img {
    opacity: 0.75;
}

.history_contents_box .search_box input {
    background: none !important;
    border: none !important;
    outline: none !important;
    color: #1a2e40 !important;
    font-size: 13.5px !important;
    font-weight: 400 !important;
    width: 100% !important;
    caret-color: #39A5F3;
}

.history_contents_box .search_box input::placeholder {
    color: #aac4d8 !important;
    font-size: 13.5px !important;
}

/* ── New Chat icon button — matches send button family ── */
.search_container .svg_box {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #2572a8 0%, #39A5F3 100%) !important;
    border: none !important;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(57, 165, 243, 0.35);
    transition: box-shadow 0.18s ease, transform 0.15s ease;
}

.search_container .svg_box:hover {
    box-shadow: 0 5px 16px rgba(57, 165, 243, 0.5) !important;
    transform: scale(1.07);
}

.search_container .svg_box:active {
    transform: scale(0.95);
}

.search_container .svg_box svg {
    color: #ffffff !important;
    width: 16px !important;
    height: 16px !important;
}

/* ── Scrollable list ── */
.history_contents_box .texts_main {
    flex: 1;
    overflow-y: auto !important;
    height: auto !important;
    padding: 0.4rem 0.7rem 4rem !important;
    margin-top: 0 !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(57, 165, 243, 0.2) transparent;
}

.history_contents_box .texts_main::-webkit-scrollbar {
    display: block !important;
    width: 3px !important;
}

.history_contents_box .texts_main::-webkit-scrollbar-thumb {
    background: rgba(57, 165, 243, 0.2);
    border-radius: 10px;
}

/* ── Date group labels ── */
.history_contents_box .texts_main h4 {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    color: #aac4d8 !important;
    margin: 1.1rem 0.4rem 0.4rem !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.history_contents_box .texts_main h4:first-child {
    margin-top: 0.2rem !important;
}

/* ── Chat item — echoes the response card style ── */
.history_contents_box .text-box {
    border-radius: 10px !important;
    padding: 0.58rem 0.8rem 0.58rem 0.95rem !important;
    margin-bottom: 0.18rem !important;
    display: flex;
    align-items: center !important;
    cursor: pointer !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    position: relative;
    overflow: hidden;
    transition: background 0.16s ease, border-color 0.16s ease;
}

/* Left accent bar — mirrors response card's border-left */
.history_contents_box .text-box::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18%;
    height: 64%;
    width: 2.5px;
    border-radius: 0 3px 3px 0;
    background: #39A5F3;
    opacity: 0;
    transform: scaleY(0.4);
    transition: opacity 0.16s ease, transform 0.18s ease;
}

.history_contents_box .text-box:hover {
    background: #f0f7fd !important;
    border-color: #deedf9 !important;
}

.history_contents_box .text-box:hover::before {
    opacity: 0.4;
    transform: scaleY(1);
}

/* ── Chat item text ── */
.history_contents_box .text-box p {
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    color: #7a9db8 !important;
    letter-spacing: 0.05px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100%;
    transition: color 0.16s ease;
}

.history_contents_box .text-box:hover p {
    color: #2c3e50 !important;
}

/* ── Active / current chat — full response-card treatment ── */
.history_contents_box .text-box[style*="background-color"] {
    background: rgba(57, 165, 243, 0.07) !important;
    border-color: #deedf9 !important;
    border-left-color: #39A5F3 !important;
    border-left-width: 2.5px !important;
}

.history_contents_box .text-box[style*="background-color"]::before {
    opacity: 1 !important;
    transform: scaleY(1) !important;
}

.history_contents_box .active-chat-label {
    color: #2572a8 !important;
    font-weight: 600 !important;
}

/* ── Bottom list fade ── */
.history_contents_box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(to top, #ffffff 30%, transparent);
    pointer-events: none;
    z-index: 5;
}

/* ── Open sidebar button in chat (hamburger) ── */
#open-sidebar {
    color: #8daecc;
    transition: color 0.15s ease;
}

#open-sidebar:hover {
    color: #39A5F3;
}

/* ── Shared icon button style (hamburger + close) ── */
.topbar-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: none;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    color: #8daecc;
    padding: 0;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}

.topbar-icon-btn:hover {
    color: #39A5F3;
    background: #e8f4fd;
    border-color: #deedf9;
}

/* ── Top bar layout: hamburger | logo (center) | dots ── */
.ask_bot_top-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.6rem 0 0.5rem !important;
}

/* ── Sidebar History label ── */
.history-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a2e40;
    letter-spacing: 0.2px;
}

/* ── Override: close button is now a topbar-icon-btn ── */
#close-sidebar {
    color: #8daecc !important;
    background: none !important;
    border-color: transparent !important;
}

#close-sidebar:hover {
    color: #39A5F3 !important;
    background: #e8f4fd !important;
    border-color: #deedf9 !important;
}

/* ── Override: open-sidebar is now a button not svg ── */
#open-sidebar {
    color: #8daecc;
}

#open-sidebar:hover {
    color: #39A5F3;
}


/* ── ProCerts styled wordmark ── */
.topbar-logo-text {
    display: flex;
    align-items: baseline;
    gap: 0;
    line-height: 1;
    flex-shrink: 0;
    user-select: none;
}

.logo-pro {
    font-size: 19px;
    font-weight: 500;
    color: #2c3e50;
    letter-spacing: -0.3px;
}

.logo-certs {
    font-size: 19px;
    font-weight: 800;
    background: linear-gradient(135deg, #2572a8 0%, #39A5F3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

.logo-ai-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #ffffff;
    background: linear-gradient(135deg, #2572a8, #39A5F3);
    border-radius: 4px;
    padding: 2px 5px;
    margin-left: 4px;
    margin-bottom: 1px;
    align-self: flex-start;
    line-height: 1.5;
}

/* ── CHAT MESSAGES (user bubble + AI response) ── */
.chatarea_textbox1-text,
.response_text_box p.answer_chat,
.response_text_box li,
.response_text_box p {
    font-size: var(--text-base) !important;
    font-weight: var(--weight-normal) !important;
    line-height: var(--leading-relaxed) !important;
    letter-spacing: var(--tracking-normal) !important;
}

/* ── INPUT TEXTAREA ── */
.send_message_box form .inputs-box textarea,
.send_message_box form .inputs-box textarea::placeholder {
    font-size: var(--text-base) !important;
    font-weight: var(--weight-normal) !important;
    line-height: var(--leading-normal) !important;
    letter-spacing: var(--tracking-normal) !important;
}

/* ── SIDEBAR CHAT ITEM TITLES ── */
.history_contents_box .text-box p,
.history_contents_box .active-chat-label {
    font-size: var(--text-sm) !important;
    font-weight: var(--weight-normal) !important;
    line-height: var(--leading-tight) !important;
    letter-spacing: var(--tracking-normal) !important;
}

.history_contents_box .active-chat-label {
    font-weight: var(--weight-semibold) !important;
}

/* ── SIDEBAR DATE GROUP LABELS ── */
.history_contents_box .texts_main h4 {
    font-size: var(--text-2xs) !important;
    font-weight: var(--weight-bold) !important;
    line-height: var(--leading-tight) !important;
    letter-spacing: var(--tracking-widest) !important;
    text-transform: uppercase !important;
}

/* ── SEARCH INPUT ── */
.history_contents_box .search_box input,
.history_contents_box .search_box input::placeholder {
    font-size: var(--text-sm) !important;
    font-weight: var(--weight-normal) !important;
    line-height: var(--leading-tight) !important;
    letter-spacing: var(--tracking-normal) !important;
}

/* ── CONTEXT MENUS (Rename, Delete, Logout) ── */
.rename_conte .rename_main span,
.delete_conte .delete_main span,
.logout_conte .logout_main span {
    font-size: var(--text-base) !important;
    font-weight: var(--weight-medium) !important;
    line-height: var(--leading-tight) !important;
    letter-spacing: var(--tracking-normal) !important;
}

/* ── MODALS ── */
.modal__title {
    font-size: var(--text-md) !important;
    font-weight: var(--weight-bold) !important;
    line-height: var(--leading-tight) !important;
    letter-spacing: var(--tracking-tight) !important;
}

.modal p,
.modal__input {
    font-size: var(--text-base) !important;
    font-weight: var(--weight-normal) !important;
    line-height: var(--leading-normal) !important;
}

.btn {
    font-size: var(--text-sm) !important;
    font-weight: var(--weight-semibold) !important;
    line-height: var(--leading-tight) !important;
    letter-spacing: var(--tracking-wide) !important;
}

/* ── COPY TOOLTIP ── */
.regenerate-copy_p_box span {
    font-size: var(--text-sm) !important;   /* was 12px */
    font-weight: var(--weight-medium) !important;
    line-height: var(--leading-tight) !important;
    letter-spacing: var(--tracking-normal) !important;
}

/* ── EMPTY STATE HEADING ── */
.ask_bot_content h1 {
    font-size: var(--text-xl) !important;
    font-weight: var(--weight-semibold) !important;
    line-height: var(--leading-tight) !important;
    letter-spacing: var(--tracking-wide) !important;
}

/* ── LOGO WORDMARK ── */
.logo-pro,
.logo-certs {
    font-size: 18px !important;   /* was 19px, tighten it */
    line-height: 1 !important;
}

.logo-pro  { font-weight: var(--weight-medium) !important; }
.logo-certs { font-weight: var(--weight-bold) !important; }

/* ── DISCLAIMER ── */
.send_message_box small {
    font-size: var(--text-xs) !important;
    font-weight: var(--weight-normal) !important;
    line-height: var(--leading-tight) !important;
    letter-spacing: var(--tracking-normal) !important;
}

/* ── CODE BLOCKS ── */
.response_text_box pre,
.response_text_box code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace !important;
    font-size: 13px !important;
    line-height: 1.65 !important;
}

