/* App Support Page Styles */

/* ======================== */
/* Animations               */
/* ======================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ======================== */
/* Navigation               */
/* ======================== */
.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-back {
    color: var(--gray-400);
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-back:hover {
    color: var(--primary-light);
}

/* ======================== */
/* App Hero                 */
/* ======================== */
.app-hero {
    padding: 110px 0 48px;
    position: relative;
    overflow: hidden;
}

.app-hero-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 400px;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.app-hero-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
    animation: fadeInUp 0.5s ease forwards;
}

.app-hero-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
}

.app-hero-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-emoji {
    font-size: 2.2rem;
}

.app-hero-text {
    min-width: 0;
}

.app-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.82rem;
}

.app-breadcrumb a {
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.2s ease;
}

.app-breadcrumb a:hover {
    color: var(--primary-light);
}

.app-breadcrumb .bc-sep {
    color: var(--gray-600);
    font-size: 0.75rem;
}

.app-breadcrumb .bc-current {
    color: var(--gray-400);
}

.app-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.app-hero p {
    color: var(--gray-400);
    font-size: 1rem;
    line-height: 1.5;
}

/* ======================== */
/* Search Section           */
/* ======================== */
.app-search-section {
    padding: 0 0 40px;
}

.app-search-wrapper {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    animation: fadeInUp 0.5s ease 0.1s both;
}

.app-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    pointer-events: none;
    display: flex;
    align-items: center;
    z-index: 1;
}

.app-search-input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: var(--gray-100);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    backdrop-filter: blur(8px);
}

.app-search-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 8px 32px rgba(0, 0, 0, 0.15);
}

.app-search-input::placeholder {
    color: var(--gray-500);
}

.app-search-hint {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--gray-600);
}

/* ======================== */
/* Category Navigation      */
/* ======================== */
.category-nav {
    max-width: 800px;
    margin: 0 auto 32px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    animation: fadeInUp 0.5s ease 0.15s both;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: var(--gray-400);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.category-pill:hover {
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--gray-200);
    background: rgba(99, 102, 241, 0.06);
}

.category-pill.active {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.12);
}

.category-pill svg {
    opacity: 0.7;
}

/* ======================== */
/* Solutions Section        */
/* ======================== */
.solutions-section {
    padding: 0 0 120px;
}

.solutions-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
    animation: fadeInUp 0.5s ease 0.2s both;
}

.solutions-category {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.solutions-category:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 16px;
}

.category-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    flex-shrink: 0;
}

.category-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-100);
    flex: 1;
    border: none;
    padding: 0;
    margin: 0;
}

.category-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray-500);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 10px;
    border-radius: 50px;
}

.articles-list {
    display: flex;
    flex-direction: column;
    padding: 0 8px 8px;
}

.article-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.article-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.article-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.article-item-icon {
    color: var(--gray-600);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.article-title {
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--gray-300);
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-item-arrow {
    color: var(--gray-600);
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
}

.article-item:hover .article-title {
    color: var(--primary-light);
}

.article-item:hover .article-item-icon {
    color: var(--primary-light);
}

.article-item:hover .article-item-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary-light);
}

.solutions-category.hidden {
    display: none;
}

/* ======================== */
/* Empty & No Results       */
/* ======================== */
.empty-solutions {
    text-align: center;
    padding: 80px 20px;
    max-width: 400px;
    margin: 0 auto;
}

.empty-solutions-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--gray-500);
}

.empty-solutions h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-300);
}

.empty-solutions p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    max-width: 400px;
    margin: 0 auto;
}

.no-results-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--gray-600);
}

.no-results h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--gray-400);
}

.no-results p {
    color: var(--gray-500);
    font-size: 0.85rem;
}

/* ======================== */
/* Responsive               */
/* ======================== */
@media (max-width: 640px) {
    .app-hero {
        padding: 100px 0 36px;
    }

    .app-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .app-breadcrumb {
        justify-content: center;
    }

    .app-hero h1 {
        font-size: 1.75rem;
    }

    .app-hero-icon {
        width: 68px;
        height: 68px;
    }

    .category-header {
        padding: 16px 18px 12px;
    }

    .article-item {
        padding: 10px 12px;
    }

    .app-search-input {
        padding: 14px 16px 14px 48px;
        font-size: 0.95rem;
    }

    .app-search-hint {
        display: none;
    }

    .category-nav {
        gap: 6px;
    }

    .category-pill {
        padding: 7px 14px;
        font-size: 0.78rem;
    }
}

/* ======================== */
/* Chat Widget              */
/* ======================== */
.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

.chat-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
    transition: var(--transition);
    position: relative;
}

.chat-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.5);
}

.fab-icon {
    font-size: 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-window {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 380px;
    height: 520px;
    background: var(--dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(99, 102, 241, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.chat-header-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.chat-header-title {
    font-weight: 700;
    font-size: 1rem;
}

.chat-header-subtitle {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.chat-header-actions {
    display: flex;
    gap: 6px;
}

.chat-header-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--gray-400);
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-header-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray-200);
}

.chat-header-btn svg {
    flex-shrink: 0;
}

/* Chat Auth */
.chat-auth {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.chat-auth-content {
    text-align: center;
    width: 100%;
}

.chat-auth-content h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.chat-auth-content p {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.chat-google-btn {
    width: 100%;
    justify-content: center;
}

.chat-auth-divider {
    display: flex;
    align-items: center;
    margin: 16px 0;
    color: var(--gray-600);
    font-size: 0.8rem;
}

.chat-auth-divider::before,
.chat-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.chat-auth-divider span {
    padding: 0 12px;
}

.chat-auth-signup {
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--gray-500) !important;
}

.chat-auth-signup a {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Chat History */
.chat-history {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.chat-history-header h4 {
    font-size: 0.9rem;
}

.chat-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.history-list-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    padding: 6px 12px 8px;
}

.history-item {
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: var(--transition);
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.history-item-content {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    cursor: pointer;
}

.history-item-title {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-snippet {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-meta {
    font-size: 0.7rem;
    color: var(--gray-600);
    display: flex;
    gap: 8px;
    align-items: center;
}

.history-item-unread {
    width: 7px;
    height: 7px;
    background: var(--primary);
    border-radius: 50%;
}

.history-item-delete {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
    padding: 6px;
    margin-right: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.history-item:hover .history-item-delete {
    opacity: 1;
}

.history-item-delete:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.history-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0 12px;
}

/* Notification Prompt */
.notification-prompt {
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.notification-prompt p {
    font-size: 0.8rem;
    margin-bottom: 8px;
    color: var(--gray-300);
}

.notif-actions {
    display: flex;
    gap: 8px;
}

.notif-actions .btn {
    padding: 6px 14px;
    font-size: 0.75rem;
}

/* Scrollbar styling - thin, auto-hide */
.chat-messages,
.chat-history-list {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 0.3s;
}

.chat-messages:hover,
.chat-history-list:hover {
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.chat-messages::-webkit-scrollbar,
.chat-history-list::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track,
.chat-history-list::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb,
.chat-history-list::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 4px;
}

.chat-messages:hover::-webkit-scrollbar-thumb,
.chat-history-list:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

.chat-messages:hover::-webkit-scrollbar-thumb:hover,
.chat-history-list:hover::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Critical: allows flex child to shrink and enable scrolling */
}

.messages-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto; /* Push messages to bottom without blocking scroll */
}


.message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    animation: msgIn 0.2s ease;
}

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

.message-customer {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message-otto {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 4px;
}

.message-agent {
    align-self: flex-start;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-bottom-left-radius: 4px;
}

.message-system {
    align-self: center;
    background: rgba(255, 255, 255, 0.03);
    color: var(--gray-500);
    font-size: 0.8rem;
    text-align: center;
    max-width: 95%;
}

.message-sender {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 4px;
    display: block;
}

.message-agent .message-sender {
    color: #10b981;
}

.message-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ======================== */
/* Markdown Rich Content    */
/* ======================== */
.md-content {
    line-height: 1.55;
}

.md-content p {
    margin: 0 0 8px;
}

.md-content p:last-child {
    margin-bottom: 0;
}

.md-content strong {
    font-weight: 600;
    color: inherit;
}

.md-content em {
    font-style: italic;
}

.md-content a {
    color: var(--primary-light);
    text-decoration: underline;
    text-decoration-color: rgba(99, 102, 241, 0.4);
    text-underline-offset: 2px;
    transition: var(--transition);
}

.md-content a:hover {
    text-decoration-color: var(--primary-light);
}

.message-customer .md-content a {
    color: #e0e7ff;
}

.md-content ul,
.md-content ol {
    margin: 6px 0;
    padding-left: 20px;
}

.md-content li {
    margin-bottom: 3px;
}

.md-content li::marker {
    color: var(--gray-500);
}

.md-content code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.82em;
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 5px;
    border-radius: 4px;
}

.message-customer .md-content code {
    background: rgba(0, 0, 0, 0.15);
}

.md-content pre {
    margin: 8px 0;
    border-radius: 8px;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.md-content pre code {
    display: block;
    padding: 10px 14px;
    background: none;
    font-size: 0.8em;
    line-height: 1.5;
    white-space: pre;
}

.md-content blockquote {
    margin: 8px 0;
    padding: 6px 12px;
    border-left: 3px solid var(--primary);
    background: rgba(99, 102, 241, 0.06);
    border-radius: 0 6px 6px 0;
    color: var(--gray-300);
}

.md-content blockquote p {
    margin: 0;
}

.md-content h3, .md-content h4, .md-content h5 {
    margin: 10px 0 4px;
    font-weight: 600;
    line-height: 1.3;
}

.md-content h3 { font-size: 1rem; }
.md-content h4 { font-size: 0.92rem; }
.md-content h5 { font-size: 0.88rem; }

.md-content hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 10px 0;
}

.md-content img.msg-img {
    max-width: 100%;
    border-radius: 8px;
    margin: 8px 0;
    display: block;
}

.md-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 0.82em;
}

.md-content th,
.md-content td {
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.md-content th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

.md-content del {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Action Buttons */
.message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.message-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-light);
    font-family: inherit;
}

.message-action-btn:hover {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.5);
    color: #fff;
}

.message-action-btn svg {
    flex-shrink: 0;
}

/* Typing indicator */
.typing-indicator {
    padding: 8px 16px;
    font-size: 0.8rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.typing-dots span {
    animation: typingDot 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

/* Chat Input */
.chat-input-area {
    flex-shrink: 0;
}

.chat-input-form {
    display: flex;
    padding: 12px;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Attach button */
.chat-attach-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    flex-shrink: 0;
    transition: var(--transition);
}

.chat-attach-btn:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
}

.chat-input-form input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--gray-100);
    font-size: 0.88rem;
    outline: none;
    font-family: inherit;
    min-width: 0;
}

.chat-input-form input:focus {
    border-color: var(--primary);
}

/* Attachment preview strip */
.chat-attach-preview {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.cw-preview-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px 8px;
    max-width: 160px;
}

.cw-preview-img {
    width: 26px;
    height: 26px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.cw-preview-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.cw-preview-name {
    font-size: 0.7rem;
    color: var(--gray-300);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.cw-preview-remove {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 50%;
    flex-shrink: 0;
    transition: var(--transition);
    padding: 0;
}

.cw-preview-remove:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Drop overlay */
.chat-drop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(99, 102, 241, 0.12);
    backdrop-filter: blur(4px);
    border-radius: 16px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.chat-drop-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.chat-drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--primary-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.chat-drop-content svg {
    stroke: var(--primary-light);
    opacity: 0.8;
}

/* Attachments in chat messages */
.cw-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.cw-attach {
    text-decoration: none;
    border-radius: 6px;
    overflow: hidden;
    transition: var(--transition);
}

.cw-attach:hover {
    opacity: 0.85;
}

.cw-attach-image {
    display: block;
}

.cw-attach-image img {
    max-width: 180px;
    max-height: 140px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.cw-attach-file {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 10px;
    border-radius: 6px;
}

.cw-attach-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.cw-attach-name {
    font-size: 0.7rem;
    color: var(--gray-400);
    word-break: break-all;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition: var(--transition);
}

.chat-send-btn:hover {
    transform: scale(1.05);
}

.loading-text {
    text-align: center;
    padding: 20px;
    color: var(--gray-500);
    font-size: 0.85rem;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}

/* Delete Chat Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.15s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-dialog {
    background: var(--dark-lighter, #1e1e2e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 28px 24px 20px;
    width: 300px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.15s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.modal-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.modal-text {
    font-size: 0.8rem;
    color: var(--gray-400);
    line-height: 1.5;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.modal-actions .btn {
    flex: 1;
    padding: 9px 16px;
    font-size: 0.8rem;
    border-radius: 8px;
    text-align: center;
    justify-content: center;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger:hover {
    background: #dc2626;
}

/* Responsive */
@media (max-width: 480px) {
    .chat-window {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
        position: fixed;
    }

    .chat-fab {
        bottom: 16px;
        right: 16px;
    }
}

/* Feedback Modal */
.feedback-dialog {
    max-width: 340px;
}

.feedback-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 16px 0;
}

.feedback-star {
    font-size: 36px;
    color: #4b5563;
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
    user-select: none;
    line-height: 1;
}

.feedback-star:hover {
    transform: scale(1.15);
}

.feedback-star.active {
    color: #fbbf24;
}

.feedback-comment {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #f3f4f6;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.feedback-comment:focus {
    outline: none;
    border-color: rgba(168, 85, 247, 0.4);
}

.feedback-comment::placeholder {
    color: #6b7280;
}

.feedback-success {
    text-align: center;
    padding: 8px 0;
}

.feedback-success .modal-icon {
    display: flex !important;
}

.feedback-success .modal-title,
.feedback-success .modal-text {
    display: block !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
