* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'LeagueSpartan', sans-serif !important;
    font-size: 18px;
    line-height: 1.6;
}

/* Define the custom font */
@font-face {
    font-family: 'LeagueSpartan';
    src:  url('/fonts/LeagueSpartan-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
}

/* old
.chatbot-popup {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    max-width: 600px;
    background-color: #ffffff;
    border-radius: 0;
    box-shadow: none;
    max-width: 100vw;
    overflow: hidden; 
}
*/
.chatbot-popup {

    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    height: 100%; 
    max-width: 600px;
    background-color: #ffffff;
    border-radius: 0;
    box-shadow: none;
    max-width: 100vw;
    overflow: hidden;
}
 


/* Welcome Header */
.chatbot-header {
    background-color: #df2027 !important; /* The red color for the header */
    color: white;
    padding: 10px 20px;
    display: flex;  /* Ensure elements align horizontally */
    align-items: center;  /* Vertically center the icon and text */
    text-align: left;
    border-bottom: 1px solid #ccc;
}

.chatbot-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px; /* Spacing between the icon and the text */
}

.chatbot-header h2 {
    margin: 0;
    font-size: 22px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 8px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background-color: #cccccc;
    border-radius: 4px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f9f9f9;
}

/* Scrollbar Styling */
.chatbot-messages::-webkit-scrollbar {
    width: 8px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background-color: #cccccc;
    border-radius: 4px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f9f9f9;
}

.chatbot-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.chatbot-message.bot {
    justify-content: flex-start;
}

.chatbot-message.user {
    justify-content: flex-end;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-bubble {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 20px;
    display: inline-block;
    word-wrap: break-word;
}

.message-bubble.bot {
    background-color: #e0e0e0;
    color: #333;
}

.message-bubble.user {
    position: relative;
    min-height: 24px;
    transition: padding 0.2s ease;
    display: flex;
    align-items: center;
}

/* Container for answer buttons */
.answer-buttons {
    flex-direction: column; /* Stack buttons vertically */
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Space between buttons */
    margin-top: 10px;
    padding: 10px 0;
    justify-content: flex-start;
}

/* Individual answer button styling */
.answer-button {
    padding: 10px 20px;
    background-color: #e0e0e0;
    border: 1px solid #d1d1d1;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

.answer-button:hover {
    background-color: #df2027;
    color: #fff;
}

.answer-button:active {
    background-color: #b81b21;
    color: #fff;
}

.answer-button:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(223, 32, 39, 0.5);
}

/* Chat Input */
.chatbot-input {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: #ffffff;
    border-top: 1px solid #ccc;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    gap: 10px;
}

.chatbot-input input {
    flex-grow: 1; /* Takes up all available space */
    padding: 12px 16px;
    border-radius: 25px;
    border: 1px solid #ccc;
    transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition */
    outline: none;
}

.chatbot-input input:focus {
    border-color: #df2027 !important; /* Red border on focus */
    box-shadow: 0 0 5px rgba(223, 32, 39, 0.5); /* Red glow effect on focus */
}

.chatbot-input button {
    padding: 12px;
    margin-left: 15px;
    border-radius: 50%;
    border: none;
    background-color: #df2027 !important; /* Red background */
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 50px;
    height: 50px;
}

.chatbot-input button:hover {
    background-color: #c51b23 !important; /* Darker red on hover */
    transform: scale(1.05); /* Slight hover effect */
}

.chatbot-input button:active {
    transform: scale(0.95); /* Button click effect */
}

.profile-picture {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chatbot-message.bot .profile-picture {
    margin-right: 10px; /* Picture on the left of the message */
}

.chatbot-message.user .profile-picture {
    margin-left: 10px; /* Picture on the right of the message */
    margin-right: 0;
}

/* Typing Indicator Container */
.typing-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

/* Typing Dots Animation */
.typing-dots {
    display: flex;
    align-items: center;
    margin-left: 10px; /* Ensure space between the profile picture and dots */
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
    animation: typing 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* Profile Picture for Bot */
.profile-picture {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-picture.bot {
    margin-right: 10px; /* Adds space between the picture and the typing dots */
}

/* Pop-in Message Animation */
@keyframes pop-in {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.message-bubble {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 20px;
    display: inline-block;
    word-wrap: break-word;
    animation: pop-in 0.4s ease-in-out; /* Add pop-in animation */
}

/* Bot message bubble styling remains the same */
.message-bubble.bot {
    background-color: #e0e0e0;
    color: #333;
}

.message-bubble.user {
    background-color: #e0e0e0;
    color: #333;
}
/* Chat Messages */

/*
.chatbot-messages {
    list-style: none;
    padding: 20px;
    display: flex;
    margin: 0;
    flex-direction: column;
    overflow-y: auto; 
    flex-grow: 1;
    background-color: #f9f9f9;
    justify-content: flex-end; 
    height: calc(100% - 60px); 
    scroll-behavior: smooth; 
    position: relative; 
}
*/

.edit-button {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    background-color: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    line-height: 0;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-button:hover {
    color: #df2027;
}

.save-edit,
.cancel-edit {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    line-height: 0;
    border-radius: 50%;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-edit svg,
.cancel-edit svg,
.edit-button svg {
    width: 16px;
    height: 16px;
    display: block;
}

.message-bubble.user {
    position: relative;
    padding-right: 35px;
    min-height: 24px;
    transition: padding 0.2s ease;
    display: flex;
    align-items: center;
}

/* Remove the hover-only visibility */
.message-bubble.user:hover .edit-button {
    opacity: 0.7;
}

.edit-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #df2027;
    border-radius: 20px;
    font-size: 14px;
    transition: box-shadow 0.2s ease;
    background-color: white;
}

.edit-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(223, 32, 39, 0.2);
}

.chatbot-messages {
    list-style: none;
    padding: 20px;
    display: flex;
    margin: 0;
    flex-direction: column;
    overflow-y: auto; 
    flex-grow: 1;
    background-color: #f9f9f9;
    max-height: 100%; 
    scroll-behavior: smooth;
    position: relative;
}

.edit-button i,
.save-edit i,
.cancel-edit i {
    font-size: 16px; /* Consistent icon size */
}

.message-bubble.user {
    position: relative;
    padding-right: 35px;
    min-height: 24px;
    transition: padding 0.2s ease;
}

/* Container for the buttons */
.edit-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
}

.save-edit:hover,
.cancel-edit:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.save-edit svg {
    color: #df2027;
}

.cancel-edit svg {
    color: #666;
}

.edit-actions-container {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.mic-button {
    padding: 12px;
    border-radius: 50%;
    border: none;
    background-color: transparent;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
}

.mic-button:hover {
    color: #df2027;
    background-color: rgba(223, 32, 39, 0.1);
}

.mic-button.recording {
    color: #df2027;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(223, 32, 39, 0.4);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(223, 32, 39, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(223, 32, 39, 0);
    }
}

.recording-time {
    font-size: 12px;
    color: #df2027;
    margin-left: 8px;
    min-width: 50px;
}

.audio-meter {
    width: 20px;
    height: 60px;
    background-color: #f0f0f0;
    border-radius: 10px;
    position: absolute;
    right: 100px;
    top: 50%;
    transform: translateY(-50%);
    overflow: hidden;
    display: none;
}

.audio-level {
    width: 100%;
    background-color: #df2027;
    position: absolute;
    bottom: 0;
    transition: height 0.1s ease;
}

.mic-button.recording + .audio-meter {
    display: block;
}

/* Language Proficiency Interface Styles */
.language-proficiency-container {
    position: relative; /* Enable absolute positioning for edit button */
    margin-top: 15px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.skill-container {
    margin-bottom: 20px;
}

.skill-container:last-of-type {
    margin-bottom: 15px;
}

.skill-label {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
    padding-left: 5px;
}

.levels-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.radio-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    border: 1px solid #dee2e6;
    background-color: white;
    min-width: 80px;
    justify-content: center;
}

.radio-container:hover {
    background-color: #e9ecef;
}

.radio-container input[type="radio"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: #df2027;
}

.radio-container input[type="radio"]:checked + .radio-label {
    color: #df2027;
    font-weight: 600;
}

.radio-container:has(input[type="radio"]:checked) {
    background-color: #fff5f5;
    border-color: #df2027;
}

.radio-container:has(input[type="radio"]:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

.radio-container input[type="radio"]:disabled {
    cursor: not-allowed;
}

.radio-container:has(input[type="radio"]:disabled):hover {
    background-color: #f8f9fa;
}

.radio-label {
    font-size: 14px;
    color: #495057;
    user-select: none;
    transition: color 0.2s ease;
}

.proficiency-submit-btn {
    background-color: #df2027;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 10px;
    width: 100%;
}

.proficiency-submit-btn:hover {
    background-color: #c41e24;
}

.proficiency-submit-btn:active {
    transform: translateY(1px);
}

.proficiency-edit-btn-main {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 10px;
    width: 100%;
}

.proficiency-edit-btn-main:hover {
    background-color: #5a6268;
}

.proficiency-edit-btn-main:active {
    transform: translateY(1px);
}


/* Responsive design for smaller screens */
@media (max-width: 480px) {
    .levels-container {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .radio-container {
        justify-content: flex-start;
        min-width: auto;
    }
    
    .language-proficiency-container {
        padding: 15px;
    }
}