/* Chat styles are included in the chat_panel.html component */
/* This file can be used for additional chat-specific styles */

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Additional message styles */
.message code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.message pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 10px 0;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 12px;
    width: fit-content;
    margin-bottom: 10px;
    margin-left: 10px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #888;
    border-radius: 50%;
    opacity: 0.6;
    animation: typing 1.4s infinite ease-in-out both;
}

.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);
    }

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

/* Simplification Prompt Styles */
.simplification-prompt {
    background: linear-gradient(135deg, #fff7e6 0%, #fef3e2 100%);
    border: 1px solid #f0d9b5;
    border-radius: 12px;
    margin: 15px 10px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(240, 217, 181, 0.3);
    animation: slideInUp 0.3s ease-out;
}

.prompt-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.prompt-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.prompt-text {
    flex: 1;
    min-width: 0;
}

.prompt-text p {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #8b5a2b;
    font-weight: 500;
}

.prompt-details {
    margin: 0;
}

.prompt-details small {
    color: #a0724d;
    font-size: 12px;
}

.simplify-button {
    background: #f4a261;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.simplify-button:hover {
    background: #e76f51;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(231, 111, 81, 0.3);
}

.simplify-button:active {
    transform: translateY(0);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Make prompt responsive */
@media (max-width: 768px) {
    .prompt-content {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .simplify-button {
        align-self: center;
        width: fit-content;
    }
}

/* Stage Selection Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.stage-selection-modal h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.25rem;
    text-align: center;
}

.stage-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stage-choice-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}

.stage-choice-btn:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
}

.stage-name {
    font-weight: 600;
    color: #2196f3;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.stage-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #333;
}

/* Proceed Button Style */
.proceed-btn {
    background-color: #28a745 !important;
    /* Ensure it stands out */
    color: white !important;
}

.proceed-btn:hover {
    background-color: #218838 !important;
}

/* Vocabulary Toggle Switch */
.vocab-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    /* Push to right */
    margin-right: 15px;
}

.toggle-label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: #2196F3;
}

input:focus+.slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked+.slider:before {
    transform: translateX(16px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}