/**
 * Frontend styles for Henotace AI Tutor
 * Beautiful, modern, and attractive design
 *
 * @package Henotace_AI_Tutor
 * @since 1.0.0
 */

/* ===== LAUNCHER BUTTON ===== */
.henotace-ai-tutor-launcher {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: block;
}

.henotace-ai-tutor-launcher-btn {
    width: 60px;
    height: 60px;
    background: #ff6b35; /* Orange color like screenshot 1 */
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.henotace-ai-tutor-launcher-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
    background: #e55a2b;
}

.henotace-ai-tutor-launcher-icon {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.henotace-ai-tutor-launcher-text {
    display: none; /* Hide text, only show icon */
}

/* ===== MAIN CONTAINER ===== */
.henotace-ai-tutor-for-learndash-container {
    position: fixed;
    bottom: 20px;
    left: 20px; /* dock to the left to avoid covering content */
    right: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
}

/* ===== CHAT HISTORY SIDEBAR ===== */
.henotace-chat-sidebar {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-radius: 16px 0 0 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 300px;
    height: 500px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    position: relative;
}

.henotace-chat-sidebar.open {
    transform: translateX(0);
}

.henotace-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.henotace-sidebar-header h3 {
    margin: 0;
    color: white;
    font-size: 18px;
    font-weight: 700;
}

.henotace-sidebar-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: none; /* Hidden on desktop */
}

.henotace-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.henotace-sidebar-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.henotace-sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.henotace-sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.henotace-sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.henotace-new-chat-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.henotace-new-chat-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.henotace-new-chat-icon {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.henotace-chat-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.henotace-chat-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.henotace-chat-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.henotace-chat-item.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.henotace-chat-item-title {
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.henotace-chat-item-time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin: 0;
}

.henotace-chat-item-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: all 0.3s ease;
    opacity: 0;
}

.henotace-chat-item:hover .henotace-chat-item-delete {
    opacity: 1;
}

.henotace-chat-item-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* ===== MOBILE MENU BUTTON ===== */
.henotace-mobile-menu-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1001;
    display: none; /* Hidden on desktop */
}

.henotace-mobile-menu-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.henotace-mobile-menu-btn.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* ===== MAIN AI TUTOR WIDGET ===== */
.henotace-ai-tutor-for-learndash-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 0 20px 20px 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 380px;
    height: 500px;
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.henotace-ai-tutor-for-learndash-widget.standalone {
    border-radius: 20px;
}

.henotace-ai-tutor-for-learndash-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* ===== SETUP SCREEN ===== */
.henotace-ai-tutor-for-learndash-setup {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 30px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.henotace-ai-tutor-for-learndash-setup-content {
    color: white;
}

.henotace-ai-tutor-for-learndash-setup-icon {
    font-size: 48px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.henotace-ai-tutor-for-learndash-setup h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.henotace-ai-tutor-for-learndash-setup p {
    margin: 0 0 25px 0;
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.5;
}

.henotace-ai-tutor-for-learndash-btn {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.henotace-ai-tutor-for-learndash-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.henotace-ai-tutor-for-learndash-btn-primary {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-color: transparent;
}

.henotace-ai-tutor-for-learndash-btn-primary:hover {
    background: linear-gradient(135deg, #ff5252, #d63031);
    transform: translateY(-2px);
}

.henotace-ai-tutor-for-learndash-setup-note {
    margin-top: 20px !important;
    font-size: 14px;
    opacity: 0.8;
}

.henotace-ai-tutor-for-learndash-setup-note a {
    color: white;
    text-decoration: underline;
}

/* ===== HEADER ===== */
.henotace-ai-tutor-for-learndash-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.henotace-ai-tutor-for-learndash-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.henotace-ai-tutor-for-learndash-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.henotace-ai-tutor-for-learndash-header-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.henotace-ai-tutor-for-learndash-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.henotace-ai-tutor-for-learndash-status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.henotace-ai-tutor-for-learndash-actions {
    display: flex;
    gap: 8px;
}

.henotace-ai-tutor-for-learndash-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-weight: bold;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.henotace-ai-tutor-for-learndash-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* ===== MESSAGES ===== */
.henotace-ai-tutor-for-learndash-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.05);
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.henotace-ai-tutor-for-learndash-messages::-webkit-scrollbar {
    width: 6px;
}

.henotace-ai-tutor-for-learndash-messages::-webkit-scrollbar-track {
    background: transparent;
}

.henotace-ai-tutor-for-learndash-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.henotace-ai-tutor-for-learndash-message {
    display: flex;
    margin-bottom: 16px;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.henotace-ai-tutor-for-learndash-bot-message {
    align-items: flex-start;
}

.henotace-ai-tutor-for-learndash-user-message {
    align-items: flex-end;
    flex-direction: row-reverse;
}

.henotace-ai-tutor-for-learndash-message .henotace-ai-tutor-for-learndash-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
    flex-shrink: 0;
}

.henotace-ai-tutor-for-learndash-user-message .henotace-ai-tutor-for-learndash-avatar {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.henotace-ai-tutor-for-learndash-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
    position: relative;
}

.henotace-ai-tutor-for-learndash-bot-message .henotace-ai-tutor-for-learndash-content {
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.henotace-ai-tutor-for-learndash-user-message .henotace-ai-tutor-for-learndash-content {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.henotace-ai-tutor-for-learndash-message-text {
    margin-bottom: 4px;
}

.henotace-ai-tutor-for-learndash-message-text p {
    margin: 0;
}

.henotace-ai-tutor-for-learndash-message-time {
    font-size: 11px;
    opacity: 0.7;
    text-align: right;
}

.henotace-ai-tutor-for-learndash-bot-message .henotace-ai-tutor-for-learndash-message-time {
    color: #6b7280;
}

.henotace-ai-tutor-for-learndash-user-message .henotace-ai-tutor-for-learndash-message-time {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== INPUT AREA ===== */
.henotace-ai-tutor-for-learndash-input-container {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.henotace-ai-tutor-for-learndash-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: 25px;
    padding: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.henotace-ai-tutor-for-learndash-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.henotace-ai-tutor-for-learndash-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    color: #1f2937;
    font-family: inherit;
}

.henotace-ai-tutor-for-learndash-input-wrapper input::placeholder {
    color: #6b7280;
    opacity: 1;
}

.henotace-ai-tutor-for-learndash-send-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.henotace-ai-tutor-for-learndash-send-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.henotace-ai-tutor-for-learndash-send-btn:active {
    transform: scale(0.95);
}

.henotace-ai-tutor-for-learndash-send-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== TYPING INDICATOR ===== */
.henotace-ai-tutor-for-learndash-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-style: italic;
}

.henotace-ai-tutor-for-learndash-typing-dots {
    display: flex;
    gap: 4px;
}

.henotace-ai-tutor-for-learndash-typing-dots span {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.henotace-ai-tutor-for-learndash-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.henotace-ai-tutor-for-learndash-typing-dots span: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; }
}

/* ===== SUMMARY & QUIZ COMPONENTS ===== */
.henotace-ai-tutor-for-learndash-summary,
.henotace-ai-tutor-for-learndash-quiz {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.henotace-ai-tutor-for-learndash-summary-header,
.henotace-ai-tutor-for-learndash-quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.henotace-ai-tutor-for-learndash-summary-header h4,
.henotace-ai-tutor-for-learndash-quiz-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.henotace-ai-tutor-for-learndash-summary-content,
.henotace-ai-tutor-for-learndash-quiz-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.6;
}

/* ===== DIALOG OVERLAY ===== */
.henotace-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.henotace-dialog-overlay.open {
    opacity: 1;
    visibility: visible;
}

.henotace-dialog-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    width: 400px;
    height: 600px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.henotace-dialog-overlay.open .henotace-dialog-widget {
    transform: scale(1) translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .henotace-ai-tutor-for-learndash-container {
        bottom: 10px;
        right: 10px;
    }
    
    .henotace-chat-sidebar {
        width: 280px;
        height: 450px;
    }
    
    .henotace-ai-tutor-for-learndash-widget {
        width: 350px;
        height: 450px;
    }
}

@media (max-width: 768px) {
    .henotace-ai-tutor-launcher {
        position: fixed;
        bottom: 20px;
        left: 20px;
        z-index: 1000;
        display: block !important;
    }
    
    .henotace-ai-tutor-launcher-btn {
        width: 60px;
        height: 60px;
        background: #ff6b35;
        border: none;
        border-radius: 50%;
        color: white;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }
    
    .henotace-ai-tutor-for-learndash-container {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(4px);
        z-index: 1000;
        display: none;
        align-items: flex-end;
        justify-content: center;
    }
    
    .henotace-ai-tutor-for-learndash-container.open {
        display: flex;
    }
    
    .henotace-chat-sidebar {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        transform: translateX(-100%);
        z-index: 1001;
    }
    
    .henotace-chat-sidebar.open {
        transform: translateX(0);
    }
    
    .henotace-sidebar-close {
        display: block;
    }
    
    .henotace-mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .henotace-ai-tutor-for-learndash-widget {
        width: 100%;
        max-width: 100vw;
        height: 80vh;
        border-radius: 20px 20px 0 0;
        margin: 0;
    }
    
    .henotace-ai-tutor-for-learndash-widget.standalone {
        border-radius: 20px;
    }
    
    .henotace-ai-tutor-for-learndash-header {
        padding: 16px;
    }
    
    .henotace-ai-tutor-for-learndash-messages {
        padding: 16px;
    }
    
    .henotace-ai-tutor-for-learndash-input-container {
        padding: 16px;
    }
    
    .henotace-ai-tutor-for-learndash-content {
        max-width: 85%;
        font-size: 13px;
    }
    
    .henotace-dialog-widget {
        width: 95vw;
        height: 80vh;
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    .henotace-ai-tutor-for-learndash-widget {
        height: 400px;
        border-radius: 16px;
    }
    
    .henotace-ai-tutor-for-learndash-header {
        padding: 12px;
    }
    
    .henotace-ai-tutor-for-learndash-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .henotace-ai-tutor-for-learndash-header-text h3 {
        font-size: 14px;
    }
    
    .henotace-ai-tutor-for-learndash-messages {
        padding: 12px;
    }
    
    .henotace-ai-tutor-for-learndash-input-container {
        padding: 12px;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .henotace-ai-tutor-for-learndash-bot-message .henotace-ai-tutor-for-learndash-content {
        background: rgba(30, 30, 30, 0.9);
        color: #e5e7eb;
    }
    
    .henotace-ai-tutor-for-learndash-input-wrapper {
        background: rgba(30, 30, 30, 0.9);
    }
    
    .henotace-ai-tutor-for-learndash-input-wrapper input {
        color: #e5e7eb;
    }
    
    .henotace-ai-tutor-for-learndash-input-wrapper input::placeholder {
        color: #9ca3af;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .henotace-ai-tutor-for-learndash-widget,
    .henotace-ai-tutor-for-learndash-send-btn,
    .henotace-ai-tutor-for-learndash-action-btn,
    .henotace-ai-tutor-for-learndash-btn {
        transition: none;
    }
    
    .henotace-ai-tutor-for-learndash-setup-icon,
    .henotace-ai-tutor-for-learndash-status-dot,
    .henotace-ai-tutor-for-learndash-typing-dots span {
        animation: none;
    }
}

/* ===== FOCUS STYLES ===== */
.henotace-ai-tutor-for-learndash-send-btn:focus,
.henotace-ai-tutor-for-learndash-action-btn:focus,
.henotace-ai-tutor-for-learndash-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.henotace-ai-tutor-for-learndash-input-wrapper input:focus {
    outline: none;
}

/* ===== LOADING STATES ===== */
.henotace-ai-tutor-for-learndash-loading {
    opacity: 0.6;
    pointer-events: none;
}

.henotace-ai-tutor-for-learndash-loading .henotace-ai-tutor-for-learndash-send-btn {
    background: #9ca3af;
    cursor: not-allowed;
}

/* ===== ERROR STATES ===== */
.henotace-ai-tutor-for-learndash-error {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 8px 0;
    font-size: 13px;
    text-align: center;
}

/* ===== SUCCESS STATES ===== */
.henotace-ai-tutor-for-learndash-success {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 8px 0;
    font-size: 13px;
    text-align: center;
}

/* ===== CLASSWORK CONTAINER ===== */
.henotace-classwork-container {
    position: relative;
    width: 300px;
    transition: all 0.3s ease;
}

.henotace-classwork-card {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.henotace-classwork-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.henotace-classwork-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.henotace-classwork-text h4 {
    margin: 0 0 4px 0;
    color: white;
    font-size: 16px;
    font-weight: 700;
}

.henotace-classwork-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.4;
}

.henotace-classwork-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 12px;
    color: white;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    white-space: nowrap;
}

.henotace-classwork-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.henotace-classwork-btn-icon {
    font-size: 16px;
}

/* ===== CLASSWORK INTERFACE ===== */
.henotace-classwork-interface {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 16px;
    padding: 20px;
    margin: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.henotace-classwork-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.henotace-classwork-title .henotace-classwork-icon {
    font-size: 20px;
}

.henotace-classwork-subject {
    color: white;
    font-size: 16px;
    font-weight: 700;
}

.henotace-classwork-progress {
    display: flex;
    align-items: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.henotace-classwork-timer,
.henotace-classwork-points {
    display: flex;
    align-items: center;
    gap: 4px;
}

.henotace-classwork-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.henotace-classwork-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.henotace-classwork-question {
    margin-bottom: 20px;
}

.henotace-classwork-question-text {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.henotace-classwork-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.henotace-classwork-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    width: 100%;
}

.henotace-classwork-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.henotace-classwork-option:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.henotace-classwork-option-correct {
    background: rgba(34, 197, 94, 0.2) !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
    color: #22c55e !important;
}

.henotace-classwork-option-incorrect {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #ef4444 !important;
}

.henotace-classwork-option-letter {
    font-weight: 700;
    min-width: 20px;
}

.henotace-classwork-option-text {
    flex: 1;
}

/* ===== CLASSWORK COMPLETION ===== */
.henotace-classwork-completion {
    text-align: center;
    color: white;
}

.henotace-classwork-completion-header h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.henotace-classwork-completion-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.henotace-classwork-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.henotace-classwork-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.henotace-classwork-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.henotace-classwork-completion-message {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

.henotace-classwork-completion-message p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.henotace-classwork-restart-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 12px;
    color: white;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.henotace-classwork-restart-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* ===== CLASSWORK BUTTON (OLD - KEEP FOR BACKWARD COMPATIBILITY) ===== */
.henotace-ai-tutor-for-learndash-classwork {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.henotace-ai-tutor-for-learndash-classwork-btn {
    width: 100%;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 12px;
    color: white;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.henotace-ai-tutor-for-learndash-classwork-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.henotace-ai-tutor-for-learndash-classwork-icon {
    font-size: 16px;
}

/* ===== FOOTER ===== */
.henotace-ai-tutor-for-learndash-footer {
    padding: 8px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.henotace-ai-tutor-for-learndash-footer-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 500;
}