/**
 * Chat Landing Page Styles
 * Beautiful welcome hub for /chat
 */

/* =====================
   Page Container
   ===================== */

.chat-landing-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 24px;
    overflow-y: auto;
    background: var(--discord-bg-primary, #1a1a1e);
}

.chat-landing-content {
    width: 100%;
    max-width: 800px;
}

/* Loading State */
.chat-landing-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 80px 20px;
    color: #888;
    font-size: 14px;
}

.chat-landing-loading i {
    font-size: 24px;
    color: #4a9eff;
}

/* =====================
   Hero Section
   ===================== */

.chat-landing-hero {
    text-align: center;
    margin-bottom: 32px;
}

.chat-landing-hero h1 {
    font-size: 28px;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0 0 8px;
    line-height: 1.2;
}

.chat-landing-tagline {
    font-size: 15px;
    color: #888;
    margin: 0;
}

/* =====================
   Quick Actions
   ===================== */

.chat-landing-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 36px;
}

.chat-landing-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    background: #121214;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
}

.chat-landing-action:hover {
    background: #1a1a2e;
    border-color: rgba(255, 255, 255, 0.15);
}

.chat-landing-action .material-icons-outlined {
    font-size: 32px;
    color: #888;
}

.chat-landing-action:hover .material-icons-outlined {
    color: #4a9eff;
}

/* Primary action (Lobby) */
.chat-landing-action-primary {
    background: #5865f2;
    border-color: #5865f2;
    color: #fff;
}

.chat-landing-action-primary:hover {
    background: #4752c4;
    border-color: #4752c4;
}

.chat-landing-action-primary .material-icons-outlined {
    color: #fff;
}

.chat-landing-action-primary:hover .material-icons-outlined {
    color: #fff;
}

/* =====================
   Section Headers
   ===================== */

.chat-landing-section {
    margin-bottom: 32px;
}

.chat-landing-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #80848e;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 0 14px;
}

.chat-landing-section-title .material-icons-outlined {
    font-size: 16px;
    color: #4a9eff;
}

/* =====================
   Starred Items
   ===================== */

.chat-landing-starred-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.chat-landing-starred-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #121214;
    border-radius: 8px;
    cursor: pointer;
}

.chat-landing-starred-item:hover {
    background: #35373c;
}

.chat-landing-starred-icon {
    font-size: 16px;
    color: #4a9eff;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-landing-starred-icon i {
    font-size: 14px;
}

.chat-landing-starred-name {
    font-size: 14px;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =====================
   Recent Conversations
   ===================== */

.chat-landing-recent-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-landing-recent-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #121214;
    border-radius: 8px;
    cursor: pointer;
}

.chat-landing-recent-item:hover {
    background: #35373c;
}

.chat-landing-recent-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2a2a3e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #888;
    font-size: 16px;
    overflow: hidden;
}

.chat-landing-recent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-landing-recent-info {
    flex: 1;
    min-width: 0;
}

.chat-landing-recent-name {
    font-size: 14px;
    font-weight: 500;
    color: #e0e0e0;
    margin-bottom: 3px;
}

.chat-landing-recent-preview {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-landing-recent-time {
    font-size: 12px;
    color: #666;
    flex-shrink: 0;
}

/* =====================
   Bot Cards
   ===================== */

.chat-landing-bot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.chat-landing-bot-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: 10px;
    cursor: pointer;
}

.chat-landing-bot-card:hover {
    border-color: #4a9eff;
}

.chat-landing-bot-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #2a2a3e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #888;
    font-size: 20px;
    overflow: hidden;
}

.chat-landing-bot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-landing-bot-info {
    flex: 1;
    min-width: 0;
}

.chat-landing-bot-name {
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 4px;
}

.chat-landing-bot-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.chat-landing-bot-caps {
    display: flex;
    gap: 8px;
    color: #4a9eff;
    font-size: 12px;
}

.chat-landing-bot-caps i {
    opacity: 0.7;
}

/* =====================
   Community Cards
   ===================== */

.chat-landing-community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.chat-landing-community-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #121214;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    cursor: pointer;
}

.chat-landing-community-card:hover {
    background: #35373c;
}

.chat-landing-community-hash {
    font-size: 18px;
    font-weight: 600;
    color: #4a9eff;
}

.chat-landing-community-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-landing-community-online {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #888;
    flex-shrink: 0;
}

.chat-landing-online-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
}

/* =====================
   Empty States
   ===================== */

.chat-landing-empty {
    text-align: center;
    padding: 32px 20px;
    color: #888;
}

.chat-landing-empty .material-icons-outlined {
    font-size: 36px;
    color: #555;
    margin-bottom: 12px;
    display: block;
}

.chat-landing-empty p {
    font-size: 14px;
    margin: 0;
}

/* =====================
   See All Links
   ===================== */

.chat-landing-see-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #4a9eff;
    margin-top: 14px;
    cursor: pointer;
    text-decoration: none;
}

.chat-landing-see-all:hover {
    text-decoration: underline;
}

.chat-landing-see-all .material-icons-outlined {
    font-size: 16px;
}

/* =====================
   Star Button (Sidebar)
   ===================== */

.messaging-star-btn {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 3px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
    margin-left: auto;
    padding: 0;
}

@media (hover: hover) {
    .messaging-item:hover .messaging-star-btn {
        display: flex;
    }
}

.messaging-star-btn:hover {
    color: #faa61a;
}

.messaging-star-btn.starred {
    display: flex;
    color: #faa61a;
}

/* =====================
   Settings Button (Sidebar)
   ===================== */

.messaging-settings-btn {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 3px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
    margin-left: auto;
    padding: 0;
}

@media (hover: hover) {
    .messaging-item:hover .messaging-settings-btn {
        display: flex;
    }
}

.messaging-settings-btn:hover {
    color: #5865f2;
}

/* =====================
   Responsive Design
   ===================== */

@media (max-width: 768px) {
    .chat-landing-page {
        padding: 24px 16px;
    }

    .chat-landing-hero h1 {
        font-size: 24px;
    }

    .chat-landing-quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .chat-landing-action {
        padding: 20px 12px;
    }

    .chat-landing-action .material-icons-outlined {
        font-size: 28px;
    }

    .chat-landing-starred-grid,
    .chat-landing-bot-grid,
    .chat-landing-community-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .chat-landing-hero h1 {
        font-size: 20px;
    }

    .chat-landing-tagline {
        font-size: 14px;
    }

    .chat-landing-action span:last-child {
        font-size: 13px;
    }

    .chat-landing-recent-item {
        padding: 12px 14px;
    }

    .chat-landing-recent-avatar {
        width: 36px;
        height: 36px;
    }
}
