/* Chatbot Specific Styles */
.chatbot-container {
    display: flex;
    height: 100vh;
    padding-top: 70px;
    background: var(--bg-secondary);
    position: relative;
}

/* Sidebar Toggle Button (Desktop) */
.sidebar-toggle-btn {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
}

.sidebar-toggle-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) translateX(2px);
}

.sidebar-toggle-btn.sidebar-open {
    left: 400px;
    transition: left 0.3s ease, background 0.3s ease;
}

/* Sidebar Styles */
.sidebar {
    width: 400px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1000;
    flex-shrink: 0;
}

/* Collapsed sidebar */
.sidebar.collapsed {
    width: 0;
    min-width: 0;
    border-right: none;
    opacity: 0;
}

/* Resize Handle */
.resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    cursor: col-resize;
    z-index: 1002;
    transition: background 0.2s ease;
}

.resize-handle:hover {
    background: var(--primary-color);
}

.resize-handle.resizing {
    background: var(--secondary-color);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h3 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.sidebar-close:hover {
    background: var(--bg-secondary);
    color: var(--error-color);
}

@media (max-width: 768px) {
    .sidebar-close.mobile-only {
        display: inline-flex;
    }
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

/* FAQ Search */
.faq-search {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: var(--transition-fast);
    background: var(--bg-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

/* FAQ Categories */
.faq-categories {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-btn {
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

/* FAQ List */
.faq-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.faq-item {
    margin: 0 1.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    transition: var(--transition);
    overflow: hidden;
}

.faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-arrow {
    color: var(--text-light);
    transition: var(--transition-fast);
    font-size: 0.75rem;
}

.faq-item.active .faq-arrow {
    transform: rotate(90deg);
    color: var(--primary-color);
}

.faq-answer {
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    padding: 0 1rem 1rem;
    max-height: 200px;
}

/* Link Styles in FAQ Answers */
.faq-answer a {
    color: #1a73e8;
    text-decoration: underline;
    cursor: pointer;
    transition: var(--transition-fast);
}

.faq-answer a:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.faq-answer a:visited {
    color: #1a73e8;
}

.faq-use-btn {
    margin: 0 1rem 1rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.faq-item.active .faq-use-btn {
    display: flex;
}

.faq-use-btn:hover {
    background: var(--secondary-color);
}

/* Chat Main Area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 300px;
}

.chat-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    flex-shrink: 0;
}

.chat-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto;
}

.chat-title h2 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.875rem;
}

.action-btn:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Mobile Sidebar Toggle */
.mobile-sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.mobile-sidebar-toggle:hover,
.mobile-sidebar-toggle:active {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.mobile-sidebar-toggle i {
    pointer-events: none;
}
/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--bg-secondary);
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    height: calc(100vh - 70px - 60px - 120px); /* viewport - navbar - header - input */
    display: flex;
    flex-direction: column;
}

.welcome-message {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.message-content {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    flex: 1;
}

.message-content h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.message-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.message-content ul {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-left: 1rem;
}

.message-content li {
    margin-bottom: 0.5rem;
}

.chat-message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
    animation: fadeInUp 0.3s ease-out;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1rem;
    flex-shrink: 0;
}

.message-bubble {
    max-width: 70%;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-lg);
    word-wrap: break-word;
    position: relative;
}

.message-bubble.user {
    background: var(--primary-color);
    color: var(--text-white);
    border-bottom-right-radius: var(--border-radius);
}

.message-bubble.bot {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: var(--border-radius);
}

/* Bold text styling in message bubbles */
.message-bubble strong,
.message-bubble b {
    font-weight: 700;
    color: inherit;
}

/* Link Styles in Message Bubbles */
.message-bubble a {
    color: #1a73e8;
    text-decoration: underline;
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 500;
}

.message-bubble a:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.message-bubble a:visited {
    color: #1a73e8;
}

.message-bubble.user a {
    color: #ffffff;
    text-decoration: underline;
}

.message-bubble.user a:hover {
    color: #f0f0f0;
}

/* Typing Indicator Styles */
.typing-indicator {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    margin: 1rem 0;
    animation: fadeIn 0.3s ease-in;
}

.message-bubble.typing {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    min-height: 20px;
    display: flex;
    align-items: center;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: typingDots 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDots {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

.message-source {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Model Selection */
.model-selector-container {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

.model-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 800px;
    margin: 0 auto;
}

.model-icon {
    color: var(--primary-color);
    font-size: 1.1rem;
    min-width: 20px;
}

.model-select {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 160px;
}

.model-select:hover,
.model-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    outline: none;
}

.model-description {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.3;
}

#model-description-text {
    display: block;
}

/* Chat Input */
.chat-input-container {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
}

.chat-input-wrapper {
    display: flex;
    gap: 0.75rem;
    max-width: 800px;
    margin: 0 auto;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    font-size: 1rem;
    resize: none;
    min-height: 50px;
    max-height: 120px;
    transition: var(--transition-fast);
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.send-button {
    padding: 1rem;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.send-button:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.send-button:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.character-count {
    font-size: 0.75rem;
    color: var(--text-light);
}

.quick-actions {
    display: flex;
    gap: 0.5rem;
}

.quick-action {
    padding: 0.5rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-action:hover {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: var(--text-white);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--text-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tablet Responsive Styles (769px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar {
        width: 320px;
    }
    
    .sidebar.open {
        width: 320px !important;
    }
    
    .chat-main {
        flex: 1;
    }
}

/* Mobile and Tablet Responsive Styles */
@media (max-width: 768px) {
    .chatbot-container {
        flex-direction: row;
        position: relative;
    }
    
    /* Hide desktop sidebar toggle on mobile */
    .sidebar-toggle-btn {
        display: none;
    }
    
    .sidebar {
        width: 85%;
        max-width: 320px;
        height: 100vh;
        position: fixed;
        top: 70px;
        left: 0;
        bottom: 0;
        transform: translate3d(-100%, 0, 0);
        transition: transform 0.3s ease-out;
        z-index: 1100;
        border-right: 1px solid var(--border-color);
        border-top: none;
        box-shadow: 4px 0 20px rgba(0,0,0,0.2);
        border-radius: 0;
        overflow-y: auto;
    }
    
    /* Collapsed state - hidden at left */
    .sidebar.collapsed {
        transform: translate3d(-100%, 0, 0) !important;
    }
    
    /* Open state - visible from left */
    .sidebar.open {
        transform: translate3d(0, 0, 0) !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 85% !important;
        max-width: 320px !important;
        min-width: 280px !important;
    }
    
    /* Hide resize handle on mobile */
    .resize-handle {
        display: none;
    }
    
    .chat-main {
        order: 1;
        height: 100vh;
        width: 100%;
    }
    
    .chat-messages {
        height: calc(100vh - 70px - 60px - 120px);
    }
    
    .mobile-only {
        display: inline-flex !important;
    }
    
    .mobile-sidebar-toggle {
        display: inline-flex;
    }
    
    .chat-header-content {
        gap: 0.75rem;
        padding: 0;
    }
    
    .chat-title {
        flex: 1;
        min-width: 0;
    }
    
    .chat-title h2 {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .chat-actions {
        display: flex;
        justify-content: flex-end;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .quick-actions {
        flex-wrap: wrap;
    }
    
    .input-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .faq-categories {
        flex-wrap: wrap;
    }
}

/* Landscape Orientation (Mobile/Tablet) */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 60%;
        max-width: 400px;
        min-width: 300px;
    }
    
    .sidebar.open {
        width: 60% !important;
        max-width: 400px !important;
        min-width: 300px !important;
    }
    
    .chat-messages {
        height: calc(100vh - 70px - 50px - 100px);
    }
}

@media (max-width: 480px) {
    .chat-header {
        padding: 1rem;
    }
    
    .chat-messages {
        padding: 1rem;
    }
    
    .chat-input-container {
        padding: 1rem;
    }
    
    .chat-input-wrapper {
        gap: 0.5rem;
    }
    
    .message-bubble {
        max-width: 90%;
        padding: 0.875rem 1rem;
    }
    
    .bot-avatar,
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .quick-action {
        padding: 0.375rem 0.625rem;
        font-size: 0.6875rem;
    }
    
    /* Sidebar remains left-sliding on small screens too */
    .sidebar {
        width: 90%;
        max-width: 280px;
        min-width: 260px;
    }
    
    .sidebar.open {
        width: 90% !important;
        max-width: 280px !important;
        min-width: 260px !important;
    }
    
    .faq-item {
        margin: 0 1rem 0.75rem;
    }
}

/* Hidden classes for responsive design */
.mobile-only {
    display: none;
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* User selection disable for resize handle */
.resize-handle,
.sidebar-toggle-btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Feedback System Styles */
.feedback-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-top: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0.7;
}

.feedback-btn:hover {
    background: rgba(var(--error-color-rgb), 0.1);
    color: var(--error-color);
    opacity: 1;
}

.feedback-btn i {
    font-size: 0.6875rem;
}

/* Feedback Modal Styles */
.feedback-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: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.feedback-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.feedback-modal {
    background: var(--bg-primary);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.feedback-modal-overlay.show .feedback-modal {
    transform: translateY(0);
}

.feedback-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feedback-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feedback-modal-header i {
    color: var(--error-color);
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.feedback-modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.required {
    color: var(--error-color);
}

.readonly-field {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.4;
    min-height: 60px;
    max-height: 150px;
    overflow-y: auto;
}

.chatbot-answer-field {
    font-family: inherit;
}

.feedback-modal textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: border-color 0.2s ease;
    resize: vertical;
    min-height: 80px;
}

.feedback-modal textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
}

.btn-primary:disabled {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* Feedback Toast */
.feedback-toast {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 2100;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.feedback-toast.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-content i {
    font-size: 1.125rem;
}

/* Mobile Responsive Feedback Modal */
@media (max-width: 768px) {
    .feedback-modal {
        width: 95%;
        margin: 1rem;
        max-height: 85vh;
    }
    
    .feedback-modal-header,
    .feedback-modal-body {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .feedback-toast {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
        opacity: 0;
        visibility: hidden;
    }
    
    .feedback-toast.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    /* Related Q&As - Mobile Responsive */
    .related-qas-section {
        margin-top: 15px;
    }
    
    .related-title {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .related-question-btn {
        width: 100%;
        padding: 10px 12px;
        margin-bottom: 5px;
        font-size: 0.85rem;
    }
    
    .related-answer-content {
        font-size: 0.85rem;
        line-height: 1.4;
        padding: 8px 12px;
    }
    
    .related-feedback-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
        margin-top: 8px;
    }
}

/* Related Q&As Styles */
.related-qas-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #e9ecef;
}

.related-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-title i {
    color: var(--primary-color);
}

.related-qas-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-qa-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-qa-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.related-question-btn {
    width: 100%;
    text-align: left;
    background: #f8f9fa;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-question-btn:hover {
    background: #e9ecef;
    color: var(--primary-color);
}

.related-question-btn i {
    transition: transform 0.3s ease;
    color: var(--primary-color);
    font-size: 0.8rem;
}

.related-answer {
    background: white;
    transition: all 0.3s ease;
    overflow: hidden;
}

.related-answer.hidden {
    max-height: 0;
    opacity: 0;
}

.related-answer:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}

.related-answer-content {
    padding: 16px;
    border-top: 1px solid #e9ecef;
    color: #555;
    line-height: 1.6;
    font-size: 0.9rem;
}

.related-feedback-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 16px 16px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
}

.related-feedback-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* Animation for expanding answers */
@keyframes expandAnswer {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 500px;
        opacity: 1;
    }
}

.related-answer:not(.hidden) {
    animation: expandAnswer 0.3s ease-out;
}