/* Skill Farm PE Career Coach - Modern Professional UI v1.2.0 - Updated */

:root {
    --sfpe-primary: #f7f7f8;
    --sfpe-primary-hover: #ededf1;
    --sfpe-primary-text: #343541;
    --sfpe-secondary: #d1d5db;
    --sfpe-background: #ffffff;
    --sfpe-surface: #f7f7f8;
    --sfpe-surface-light: #fafbfc;
    --sfpe-border: #e5e7eb;
    --sfpe-border-light: #f3f4f6;
    --sfpe-text-primary: #374151;
    --sfpe-text-secondary: #6b7280;
    --sfpe-text-muted: #9ca3af;
    --sfpe-accent: #10a37f;
    --sfpe-button-bg: #19c37d;
    --sfpe-button-hover: #0f9a6c;
    --sfpe-success: #10a37f;
    --sfpe-error: #ef4444;
    --sfpe-radius: 8px;
    --sfpe-radius-sm: 4px;
    --sfpe-radius-lg: 12px;
    --sfpe-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --sfpe-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sfpe-chat-widget {
    max-width: 1000px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: relative;
    background: var(--sfpe-background);
}

.sfpe-chat-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 0 16px;
}

.sfpe-welcome-text {
    font-size: 24px;
    font-weight: 600;
    color: var(--sfpe-text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.sfpe-subtitle {
    font-size: 16px;
    color: var(--sfpe-text-secondary);
    margin: 0;
    font-weight: 400;
}

.sfpe-chat-container {
    background: var(--sfpe-background);
    border: 1px solid var(--sfpe-border);
    border-radius: var(--sfpe-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.sfpe-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--sfpe-background);
    scroll-behavior: smooth;
}

.sfpe-initial-prompt {
    text-align: center;
    padding: 40px 20px;
}

.sfpe-initial-prompt p {
    font-size: 16px;
    color: var(--sfpe-text-secondary);
    margin-bottom: 24px;
    font-weight: 400;
    line-height: 1.5;
}

.sfpe-prompt-suggestions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.sfpe-prompt-suggestion {
    background: var(--sfpe-surface-light);
    border: 1px solid var(--sfpe-border-light);
    border-radius: var(--sfpe-radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    color: var(--sfpe-text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-weight: 400;
    line-height: 1.4;
}

.sfpe-prompt-suggestion:hover {
    background: var(--sfpe-primary);
    border-color: var(--sfpe-border);
    color: var(--sfpe-primary-text);
}

.sfpe-message {
    margin-bottom: 16px;
    display: flex;
    animation: messageSlideIn 0.3s ease-out;
}

.sfpe-message-user {
    justify-content: flex-end;
}

.sfpe-message-assistant {
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
}

.sfpe-message-assistant::before {
    content: '◐';
    width: 24px;
    height: 24px;
    background: var(--sfpe-accent);
    color: white;
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.sfpe-message-content {
    max-width: 80%;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
}

.sfpe-message-user .sfpe-message-content {
    background: var(--sfpe-button-bg);
    color: #ffffff;
    border-radius: var(--sfpe-radius-lg) var(--sfpe-radius-lg) var(--sfpe-radius-sm) var(--sfpe-radius-lg);
}

.sfpe-message-assistant .sfpe-message-content {
    background: var(--sfpe-surface);
    color: var(--sfpe-text-primary);
    border: 1px solid var(--sfpe-border);
    border-radius: var(--sfpe-radius-sm) var(--sfpe-radius-lg) var(--sfpe-radius-lg) var(--sfpe-radius-lg);
}

.sfpe-message-error .sfpe-message-content {
    background: #fef2f2;
    color: var(--sfpe-error);
    border-radius: var(--sfpe-radius);
}

/* Animated Skeleton Loader */
.sfpe-skeleton-loader {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 80%;
    animation: skeletonFadeIn 0.3s ease-out;
}

.sfpe-skeleton-avatar {
    width: 24px;
    height: 24px;
    background: var(--sfpe-accent);
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    overflow: hidden;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.sfpe-skeleton-avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: skeletonShimmer 1.2s infinite ease-in-out;
}

.sfpe-skeleton-content {
    flex: 1;
    background: var(--sfpe-surface);
    border: 1px solid var(--sfpe-border);
    border-radius: var(--sfpe-radius-sm) var(--sfpe-radius-lg) var(--sfpe-radius-lg) var(--sfpe-radius-lg);
    padding: 12px 16px;
    position: relative;
    overflow: hidden;
}

.sfpe-skeleton-content::after {
    content: '';
    position: absolute;
    bottom: 8px;
    right: 12px;
    width: 8px;
    height: 8px;
    background: var(--sfpe-text-muted);
    border-radius: 50%;
    animation: skeletonTyping 1.4s infinite ease-in-out;
}

.sfpe-skeleton-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(229, 231, 235, 0.8), transparent);
    animation: skeletonShimmer 1.8s infinite ease-in-out;
    animation-delay: 0.3s;
}

.sfpe-skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 50%, #f3f4f6 100%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 8px;
    animation: skeletonLineShimmer 1.4s infinite ease-in-out;
    position: relative;
    overflow: hidden;
}

.sfpe-skeleton-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: skeletonShimmer 1.4s infinite ease-in-out;
}

.sfpe-skeleton-line:last-child {
    margin-bottom: 0;
    width: 60%;
}

.sfpe-skeleton-line:nth-child(1) {
    width: 85%;
    animation-delay: 0.1s;
}

.sfpe-skeleton-line:nth-child(2) {
    width: 90%;
    animation-delay: 0.2s;
}

.sfpe-skeleton-line:nth-child(3) {
    width: 65%;
    animation-delay: 0.3s;
}

.sfpe-skeleton-line:nth-child(1)::after {
    animation-delay: 0.1s;
}

.sfpe-skeleton-line:nth-child(2)::after {
    animation-delay: 0.2s;
}

.sfpe-skeleton-line:nth-child(3)::after {
    animation-delay: 0.3s;
}

@keyframes skeletonShimmer {
    0% {
        left: -100%;
    }
    50% {
        left: 0%;
    }
    100% {
        left: 100%;
    }
}

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

@keyframes skeletonFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes skeletonLineShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes skeletonTyping {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes messageSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    60% {
        transform: translateY(-4px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Legacy typing indicator (fallback) */
.sfpe-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.sfpe-typing-indicator span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.sfpe-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.sfpe-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

.sfpe-chat-input-container {
    background: var(--sfpe-background);
    border-top: 1px solid var(--sfpe-border);
    padding: 16px;
    flex-shrink: 0;
}

.sfpe-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    background: var(--sfpe-surface);
    border: 1px solid var(--sfpe-border);
    border-radius: var(--sfpe-radius-lg);
    padding: 8px;
}

/* File Upload Styles - Claude-like */
.sfpe-file-upload-wrapper {
    position: relative;
}

.sfpe-file-input {
    display: none;
}

.sfpe-file-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--sfpe-radius-sm);
    cursor: pointer;
    color: var(--sfpe-text-muted);
    transition: all 0.2s ease;
    position: relative;
}

.sfpe-file-button::before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.sfpe-file-button:hover {
    background: var(--sfpe-primary);
}

.sfpe-file-button:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23374151'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13'/%3E%3C/svg%3E");
}

/* Professional Chat Actions */
.sfpe-chat-actions {
    padding: 16px 24px;
    background: var(--sfpe-surface);
    border-top: 2px solid var(--sfpe-border);
}

/* Professional SVG Icons */
.sfpe-icon-history::before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: inline-block;
    margin-right: 6px;
}

.sfpe-icon-download::before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: inline-block;
    margin-right: 6px;
}

.sfpe-icon-share::before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: inline-block;
    margin-right: 6px;
}

.sfpe-action-btn:hover .sfpe-icon-history::before,
.sfpe-action-btn:hover .sfpe-icon-download::before,
.sfpe-action-btn:hover .sfpe-icon-share::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z'/%3E%3C/svg%3E");
}

.sfpe-action-btn:hover .sfpe-icon-download::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4'/%3E%3C/svg%3E");
}

.sfpe-action-btn:hover .sfpe-icon-share::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z'/%3E%3C/svg%3E");
}

.sfpe-action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.sfpe-action-btn {
    background: var(--sfpe-background);
    border: 2px solid var(--sfpe-border);
    border-radius: var(--sfpe-radius-sm);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--sfpe-text-secondary);
    box-shadow: var(--sfpe-shadow);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sfpe-action-btn:hover {
    background: var(--sfpe-button-bg);
    border-color: var(--sfpe-button-bg);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--sfpe-shadow-lg);
}

/* File Upload Indicator */
.sfpe-file-uploaded {
    background: #e8f5e8;
    border: 1px solid #28a745;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #155724;
}

.sfpe-file-uploaded .sfpe-file-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    margin-left: 8px;
    font-size: 16px;
}

/* Chat History Sidebar */
.sfpe-history-sidebar {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    z-index: 10000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.sfpe-history-sidebar.open {
    right: 0;
}

.sfpe-history-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.sfpe-history-header h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.sfpe-history-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.sfpe-history-list {
    padding: 20px;
}

.sfpe-history-item {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sfpe-history-item:hover {
    background: #f8f9fa;
}

.sfpe-history-item-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.sfpe-history-item-preview {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.sfpe-history-item-date {
    font-size: 12px;
    color: #999;
}

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

.sfpe-modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    position: relative;
}

.sfpe-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.sfpe-modal h3 {
    margin: 0 0 20px 0;
    color: #333;
}

.sfpe-format-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.sfpe-format-btn {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.sfpe-format-btn:hover,
.sfpe-format-btn.selected {
    border-color: #2563eb;
    background: #f0f7ff;
}

.sfpe-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.sfpe-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.sfpe-btn-primary {
    background: #2563eb;
    color: white;
}

.sfpe-btn-primary:hover {
    background: #1d4ed8;
}

.sfpe-btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e0e0e0;
}

.sfpe-btn-secondary:hover {
    background: #e9ecef;
}

.sfpe-chat-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-size: 15px;
    resize: none;
    outline: none;
    font-family: inherit;
    line-height: 1.4;
    max-height: 120px;
    color: var(--sfpe-text-primary);
    min-height: 20px;
}

.sfpe-chat-input::placeholder {
    color: var(--sfpe-text-muted);
    font-weight: 400;
}

.sfpe-send-button {
    background: var(--sfpe-button-bg) !important;
    color: #ffffff !important;
    border: none;
    border-radius: var(--sfpe-radius-sm);
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* SVG icon for send button when no custom text is used */
.sfpe-send-button.sfpe-icon-only::before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 19l9 2-9-18-9 18 9-2zm0 0v-8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.sfpe-send-button:hover:not(:disabled) {
    background: var(--sfpe-button-hover) !important;
    color: #ffffff !important;
}

.sfpe-send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--sfpe-text-muted);
}

.sfpe-usage-notice {
    text-align: center;
    padding: 12px;
    font-size: 14px;
    color: #666;
}

.sfpe-usage-notice a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.sfpe-usage-notice a:hover {
    text-decoration: underline;
}

.sfpe-limit-reached {
    text-align: center;
    padding: 20px;
    background: #fef3c7;
    border-radius: 8px;
    margin: 16px;
}

.sfpe-limit-reached p {
    margin-bottom: 12px;
    color: #92400e;
}

.sfpe-upgrade-button {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 10px 24px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
}

.sfpe-upgrade-button:hover {
    background: #1d4ed8;
}

/* Code blocks */
.sfpe-message-content pre {
    background: #f4f4f4;
    border-radius: 6px;
    padding: 12px;
    overflow-x: auto;
    margin: 12px 0;
}

.sfpe-message-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
}

.sfpe-message-content pre code {
    background: none;
    padding: 0;
}

/* Scrollbar styling */
.sfpe-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.sfpe-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.sfpe-chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

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

/* Streaming cursor animation */
.sfpe-streaming-cursor {
    animation: blink 1s infinite;
    color: #2563eb;
    font-weight: bold;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.sfpe-streaming-text {
    white-space: pre-wrap;
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
    .sfpe-chat-widget {
        max-width: 90%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .sfpe-chat-widget {
        max-width: 95%;
        margin: 0 auto;
    }
    
    .sfpe-chat-container {
        height: 500px;
    }
    
    .sfpe-chat-messages {
        padding: 16px;
    }
    
    .sfpe-prompt-suggestions {
        grid-template-columns: 1fr;
    }
    
    .sfpe-chat-input-container {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .sfpe-welcome-text {
        font-size: 20px;
    }
    
    .sfpe-chat-container {
        height: 450px;
    }
    
    .sfpe-message-content {
        max-width: 85%;
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .sfpe-message-assistant::before {
        width: 20px;
        height: 20px;
    }
    
    .sfpe-skeleton-avatar {
        width: 20px;
        height: 20px;
    }
}

/* Dark mode support disabled - always use light theme */
/* @media (prefers-color-scheme: dark) {
    :root {
        --sfpe-background: #0f172a;
        --sfpe-surface: #1e293b;
        --sfpe-surface-2: #334155;
        --sfpe-border: #475569;
        --sfpe-text-primary: #f8fafc;
        --sfpe-text-secondary: #cbd5e1;
        --sfpe-text-muted: #94a3b8;
    }
} */

/* Force light theme for Elementor widgets */
.elementor-widget-sfpe-chat .sfpe-chat-widget {
    --sfpe-primary: #f7f7f8 !important;
    --sfpe-primary-hover: #ededf1 !important;
    --sfpe-primary-text: #343541 !important;
    --sfpe-secondary: #d1d5db !important;
    --sfpe-background: #ffffff !important;
    --sfpe-surface: #f7f7f8 !important;
    --sfpe-surface-light: #fafbfc !important;
    --sfpe-border: #e5e7eb !important;
    --sfpe-border-light: #f3f4f6 !important;
    --sfpe-text-primary: #374151 !important;
    --sfpe-text-secondary: #6b7280 !important;
    --sfpe-text-muted: #9ca3af !important;
    --sfpe-accent: #10a37f !important;
    --sfpe-button-bg: #19c37d !important;
    --sfpe-button-hover: #0f9a6c !important;
}

.elementor-widget-sfpe-chat .sfpe-chat-widget,
.elementor-widget-sfpe-chat .sfpe-chat-widget * {
    color: var(--sfpe-text-primary) !important;
}

.elementor-widget-sfpe-chat .sfpe-message-user .sfpe-message-content {
    background: var(--sfpe-button-bg) !important;
    color: #ffffff !important;
}

.elementor-widget-sfpe-chat .sfpe-message-assistant .sfpe-message-content {
    background: var(--sfpe-surface) !important;
    color: var(--sfpe-text-primary) !important;
}

/* Override send button styling for Elementor widget */
.elementor-widget-sfpe-chat .sfpe-send-button::before {
    display: none !important;
}

.elementor-widget-sfpe-chat .sfpe-send-button .sfpe-send-icon {
    display: inline !important;
}

.elementor-widget-sfpe-chat .sfpe-send-button,
.elementor-widget-sfpe-chat .sfpe-send-button:hover {
    color: #ffffff !important;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --sfpe-border: #000000;
        --sfpe-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .sfpe-chat-input,
    .sfpe-message-content {
        border-width: 3px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}