html {
    --darkblue: #05315D;
    --lightblue: #005CB9;
    --blue: #0A51A0;
    --black: #2C2C2C;
    --linkblue: #0D6EFD;
    --red : #E53E1A;
}

html body .uwy {
   z-index: 2 !important;
}

/* @font-face {
    font-family: ‘manrope’;
    src: url(‘https://coa.msdev.gr/wp-content/uploads/fonts/manrope-bold.woff2’) format(‘woff2’);
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: ‘manrope’;
    src: url(‘https://coa.msdev.gr/wp-content/uploads/fonts/manrope-light.woff2’) format(‘woff2’);
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: ‘manrope’;
    src: url(‘https://coa.msdev.gr/wp-content/uploads/fonts/manrope-regular.woff2’) format(‘woff2’);
    font-weight: 400;
    font-style: normal;
} */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Manrope", sans-serif !important;
    font-weight: 400;
}

body::before {
    content: "";
    display: block;
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: transparent;
    top: 0;
    left: 0;
    z-index: 2;
    transition: 0.3s all ease-in-out;
}

body.locked {
    overflow: hidden !important;
    position: relative
}

body.locked::before {
    background-color: rgba(0,0,0,.20);
}



.chatbot-toggler {
    position: fixed;
    top: auto;
    right: 4px;
    outline: none;
    border: none;
    height: 68px;
    width: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bs-blue);
    transition: all 0.2s ease;
    z-index: 4;
    bottom: 65px;
}


.chatbot-helper {
    position: fixed;
    bottom: 80px;
    right: 80px;
    z-index: 2;
    background-color: white;
    border: 1px solid var(--bs-blue);
    border-radius: 4px;
    border-bottom-right-radius: 0px;
    transition: 0.3s transform ease-in-out, 0.3s opacity ease-in-out;

}



.chatbot-helper.hide, .chatbot-helper.hide .chatbot-helper-text, .chatbot-helper.hide .chatbot-helper-close {
    opacity: 0;
    pointer-events: none;
    transform: translateY(150px);   
}


button.chatbot-helper-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--bs-blue);
    border: none;
    background: transparent;
    padding: 10px 20px;
    transition: 0.3s transform ease-in-out, 0.3s opacity ease-in-out;
}

button.chatbot-helper-close {
    border-radius: 50%;
    width: 20px;
    height: 20px;
    border: none;
    background: var(--red);
    cursor: pointer;
    appearance: none;
    display: block;
    position: absolute;
    padding: 0;
    font-size: 20px;
    line-height: 20px;
    top: -8px;
    left: -8px;
    transition: 0.3s transform ease-in-out, 0.3s opacity ease-in-out;
    color: #ffffff;
}

button.chatbot-helper-close.hide {
    opacity: 0;
    pointer-events: none;
    transform: translateY(150px);
}

.chat-open-icon {
    position: relative;
    width: 36px;
    height: 36px;
}

.chat-open-icon::before {
    position: absolute;
    background-size: 36px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background-repeat: no-repeat;
    background-image: url(/wp-content/themes/iw_theme/assets/AI/images/chatbot.svg);
    content: "";
    display: block;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: unset;
    align-items: unset;
    justify-content: unset;
    padding: 16px;
    z-index: 1000;
}

#chatbotModal .modal-content {
    background: transparent;
    border-radius: none;
    box-shadow: none;
    width: 100%;
    max-width: unset;
    max-height: unset;
    display: block;
    flex-direction: unset;
    border: 0;
}


#chatbotModal {
    position: fixed;
    opacity: 0;
    top: 0;
    left: 100vw;
    width: 400px;
    height: 100vh;
    background-color: white;
    padding: 0;
    z-index: 1000;
    transition: 0.3s transform ease-in-out, 0.3s opacity ease-in-out;
    padding-left: 0px !important;
    padding-right: 0px !important;
}

div#chatbotModal.active {
    opacity: 1;
    transform: translateX(-400px);
    display: block;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    flex-direction: column;
    margin-bottom: 36px;
    background-color: #F5F7FA;
    box-shadow: 0px 4px 10px 0px #81818130;
    border: none;
}

.header-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-back-btn {
    background: #B4CBED50;
    position: relative;
    border: none;
    cursor: pointer;
    padding: 5px 20px;
    border-radius: 16px;
}


.header-back-btn:hover {
   background-color: #B4CBED90;
}

span.back-txt {
    font-size: 14px;
    padding-left: 8px;
    color: var(--blue);
    font-weight: 500;
}

.header-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}


.left-buttons {
    display: flex;
    align-items: center;
}

.right-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-back-container {
    display: none;
}



.back-icon {
    position: relative;
}

.back-icon::before {
    display: block;
    background-image: url(/wp-content/themes/iw_theme/assets/AI/images/back-btn.svg);
    width: 17px;
    height: 10px;
    content: "";
    background-repeat: no-repeat;
    left: 50%;
    top: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
}

.header-back-container.show {
    display: block;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-title h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--blue);
    margin: 0;
}

button#infoIcon {
    width: 19px;
    height: 19px;
    background-image: url(/wp-content/themes/iw_theme/assets/AI/images/info.svg);
}

.info-icon-container {
    position: relative;
}

.info-icon {
    background: none;
    border: none;
    color: #2563eb;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-icon:hover {
    background-color: #eff6ff;
}

.info-popup {
    position: absolute;
    top: 100%;
    left: calc(50% - 60px);
    transform: translateX(-50%);
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    width: 298px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1001;
    display: none;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

.info-popup p {
    font-family: "Manrope", sans-serif !important;
    font-size: 14px;
    line-height: 28px;
    margin-bottom: 30px;
    margin-top: 10px;
}

.info-popup p:last-child {
    margin-bottom: 0;
}

.info-popup .disclaimer {
    background-color: #0D6EFD10;
    padding: 16px 14px 16px 14px;
    border-radius: 2%;
    color: var(--darkblue);
}

#infoPopup.chat-mode {
    left: calc(50% - 100px);
}



.reset-btn {
    display: none;
    position: relative;
    width: 18px;
    height: 18px;
    padding: 8px;
    border-radius: 4px;
    border:none;
    cursor: pointer;
}

.reset-btn::before {
    display: block;
    background-image: url(/wp-content/themes/iw_theme/assets/AI/images/reset-icon.svg);
    width: 18px;
    height: 18px;
    content: "";
    background-repeat: no-repeat;
    left: 50%;
    top: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
}


.reset-btn:hover::before {
    filter: brightness(0) saturate(100%) invert(14%) sepia(88%) saturate(5392%) hue-rotate(200deg) brightness(93%) contrast(101%);
}

.close-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

#closeBtn svg {
    width: 27px;
    height: 27px;
    color: var(--darkblue);
}

#closeBtn:hover svg {
    color: var(--lightblue);
}

.search-section {
    position: relative;
    width: 100%;
    margin: 20px 0 0;
}

.search-input {
    width: 100%;
    padding: 12px 50px 12px 16px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    border-color: #3b82f6;
    background-color: white;
}

.search-input::placeholder {
    color: #9ca3af;
}

.send-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.send-btn:hover {
    color: #2563eb;
}

.main-categories {
    padding: 0 24px 24px 24px;
    flex: 1;
    overflow: hidden;
}

.main-categories h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 16px;
    margin-top: 16px;
}

.main-categories .category-item:first-of-type {
    background-color: #0D6EFD10;
}

.main-categories .category-item:last-of-type {
    background-color: #45409510;
}

.main-categories .category-item:first-of-type:hover {
    background-color: #0D6EFD20;
}

.main-categories .category-item:last-of-type:hover {
    background-color: #45409520;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: none;
}

.category-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.category-icon {
    padding: 12px;
    border-radius: 8px;
    flex-shrink: 0;
}

.services-icon {
    background-color: #dbeafe;
    color: #2563eb;
}

.information-icon {
    background-color: #45409510 !important;
}

.services-icon,
.information-icon {
    position: relative;
    width: 36px;
    height: 36px;
    background-color: #0D6EFD10;
    border-radius: 0;
}

.services-icon::before,
.information-icon::before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 17px;
    background-repeat: no-repeat;
    background-image: url(/wp-content/themes/iw_theme/assets/AI/images/services-icon.svg);
    content: "";
    display: block;
}

.information-icon::before {
    background-image: url(/wp-content/themes/iw_theme/assets/AI/images/updates-icon.svg);
    width: 24px;
    height: 23px;
}

.category-text h4 {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.category-text p {
    font-family: "Manrope", sans-serif !important;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

.chevron {
    color: #9ca3af;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.category-item:hover .chevron {
    color: #6b7280;
}

.subcategories {
    padding: 0 24px 24px 24px;
    flex: 1;
    overflow: hidden;
}

.subcategory-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    margin-top: 16px;
}

.back-btn {
    position: relative;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.back-btn::before {
    display: block;
    background-image: url(/wp-content/themes/iw_theme/assets/AI/images/back-btn.svg);
    width: 17px;
    height: 10px;
    content: "";
    background-repeat: no-repeat;
    left: 50%;
    top: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    filter: brightness(0) saturate(100%);
}

.back-btn:hover {
    color: #374151;
    background-color: #f9fafb;
}

.subcategory-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
    margin: 0;
}

.subcategory-list {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.subcategory-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #F5F7FA;
    transform: translateY(3em);
    animation: totop 300ms forwards;
    opacity: 0;
    width: 100%;
}

.subcategory-item:hover {
    background-color: #f9fafb;
}

.subcategory-item span {
    color: var(--darkblue);
    font-size: 14px;
    font-weight: 400;
}

.subcategory-item .chevron {
    color: var(--darkblue);
    transition: color 0.2s ease;
}

.subcategory-item:hover .chevron {
    color: #6b7280;
}

.subcategory-item:nth-of-type(1) {
        animation-delay: 100ms;
}

.subcategory-item:nth-of-type(2) {
    animation-delay: 200ms;
}

.subcategory-item:nth-of-type(3) {
    animation-delay: 300ms;
}

.subcategory-item:nth-of-type(4) {
    animation-delay: 400ms;
}

.subcategory-item:nth-of-type(5) {
    animation-delay: 500ms;
}

.subcategory-item:nth-of-type(6) {
    animation-delay: 600ms;
}

.subcategory-item:nth-of-type(7) {
    animation-delay: 700ms;
}


.subcategory-item:nth-of-type(8) {
    animation-delay: 800ms;
}


.subcategory-item:nth-of-type(9) {
    animation-delay: 900ms;
}


.subcategory-item:nth-of-type(10) {
    animation-delay: 1s;
}


/* Chat Messages Area */
.chat-mode-container {
    display: none;
}

.message-input-section {
    display: none;
    width: 100%;
    background-color: #F5F7FA;
    min-height: 210px;
    position: absolute;
    bottom: 0;
    align-items: center;
    flex-direction: column;
    justify-items: flex-start;
    justify-content: center;
}

.message-input-section textarea.search-input {
    /* border: none; */
    background-color: white;
    min-height: 130px;
    width: 100%;
    max-width: 352px;
    padding: 20px;
    font-size: 14px;
    resize: none;
}

.message-input-section textarea.search-input:focus {
    border-color: #3b82f6;
    background-color: white;
}

.message-input-section .send-btn {
    left: calc(100% - 70px);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
    bottom: 25px;
    right: unset;
    top: unset;
}

.chat-messages {
    flex: 1;
    padding: 16px 20px 0 24px;
    display: none;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
}

.message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.assistant {
    align-items: flex-start;
    position: relative;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.user .message-content {
    background-color: var(--blue);
    color: white;
    border-radius: 8px;
    border-bottom-right-radius: 0px;
}

.message.assistant .message-content {
    background-color: #F5F7FA;
    color: var(--black);
    border-radius: 8px;
    border-bottom-left-radius: 0px;
    margin-left: 10px;
}

.message-content a {
    color: inherit;
    text-decoration: underline;
}

.message.user .message-content a {
    color: #bfdbfe;
}

.message.assistant .message-content a {
    color: var(--linkblue);
    text-decoration: none;
}

.message.assistant .message-content a:hover {
    text-decoration: underline;
}

.chatbot-icon {
    position: absolute;
    bottom: 0;
    left: -20px;
    width: 20px;
    height: 20px;
    background-color: var(--blue);
    border-radius: 4px;
}

.chatbot-icon::before {
    display: block;
    background-image: url(/wp-content/themes/iw_theme/assets/AI/images/chatbot.svg);
    width: 12px;
    height: 12px;
    content: "";
    background-repeat: no-repeat;
    left: 50%;
    top: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
}

.chat-messages {
    flex: 1;
    padding: 16px 20px 0 40px;
    display: none;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
}

.typing-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background-color: #f3f4f6;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    max-width: 80%;
    margin-bottom: 16px;
    margin-left: 22px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #9ca3af;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Scrollbar styling */
.subcategory-list::-webkit-scrollbar {
    width: 6px;
}

.subcategory-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.subcategory-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.subcategory-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animation */
@keyframes totop {
        0% {
            opacity: 0;
            transform: translateY(3em);
        }
        100% {
            opacity: 1;
            transform: translateY(0em);
        }
    }

/* Responsive design */
@media (max-width: 480px) {

    .message-input-section textarea.search-input {
        max-width: calc(100vw - 40px);
        min-height: 100px;
    }

    .message-input-section {
        min-height: 150px;
    }

    .modal-header {
        padding: 20px 20px 16px 20px;
        margin-bottom: 10px;
    }

    .header-title h2 {
        font-size: 18px;
    }

    .info-popup {
        width: 280px;
    }

    #chatbotModal {
        height: 100vh;
        width: 100vw;
    }

    #chatbotModal .modal-content {
        height: 100vh;
    }

    #chatbotModal .modal-content.chat-mode {
        height: calc(100vh - 240px);
    }

    div#chatbotModal.active {
        transform: translateX(-100vw); 
    }

    .subcategories {
        overflow: auto;
        
    }

    .chat-mode-container {
        max-height: calc(100vh - 370px);
        overflow: auto;
    }

    #chatbotModal input, #chatbotModal textarea {
        font-size: 16px;
    }

    .chat-messages {
        max-height: 100vh;
    }

    .subcategory-list {
    max-height: calc(100vh - 330px);
    overflow-y: auto;
}

}