/* Global resets and layout config */
:root {
    --bg-main: #0B0E14;
    --bg-sidebar: #131722;
    --bg-card: #131722;
    --bg-card-hover: #1B2130;
    --bg-bubble-self: rgba(96, 165, 250, 0.15);
    --bg-bubble-other: #131722;
    --border-color: #262D3D;

    --text-primary: #E5E9F0;
    --text-secondary: #6B7280;
    --text-muted: #6B7280;
    --text-error: #F87171;

    --primary-accent: #4ADE80;
    --secondary-accent: #60A5FA;
    --warning-accent: #F87171;

    --online-color: #4ADE80;
    --accent-hover: #1B2130;
    --input-focus: #4ADE80;

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --border-radius: 12px;
    --transition-speed: 0.2s;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.hidden {
    display: none !important;
}

/* Username entry overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.overlay:not(.hidden) {
    animation: fadeIn 0.2s ease forwards;
}

.app-layout:not(.hidden) {
    animation: fadeIn 0.2s ease forwards;
}

.login-card {
    background-color: var(--bg-card);
    width: 90%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px fill var(--border-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.logo-area {
    text-align: center;
    margin-bottom: 2rem;
}

.chat-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.logo-area h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.logo-area p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.input-group input {
    background-color: var(--bg-main);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.input-group input:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.error-banner {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

#login-form button {
    width: 100%;
    background-color: var(--bg-bubble-self);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: background-color var(--transition-speed), transform 0.1s ease;
}

#login-form button:hover {
    background-color: var(--accent-hover);
}

#login-form button:active {
    transform: scale(0.98);
}

/* App Main Layout */
.app-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100vh;
    height: 100dvh;
    width: 100%;
}

/* Sidebar Styling */
.sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 10;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-brand h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}

.status-indicator-dot.online {
    background-color: var(--online-color);
    box-shadow: 0 0 6px var(--online-color);
}

.status-indicator-dot.online::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 1px solid var(--online-color);
    opacity: 0;
    animation: signal-pulse 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.badge {
    background-color: var(--bg-main);
    color: var(--text-secondary);
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 12px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

#online-users-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#online-users-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.938rem;
    color: var(--text-secondary);
    transition: background-color 0.15s ease, color 0.15s ease;
}

#online-users-list li:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
    cursor: default;
}

.user-avatar-small {
    width: 28px;
    height: 28px;
    background-color: var(--bg-bubble-other);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 0.813rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.current-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background-color: var(--bg-bubble-self);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-details .user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-details .user-status {
    font-size: 0.75rem;
    color: var(--online-color);
}

#logout-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    transition: color 0.2s, background-color 0.2s;
}

#logout-btn:hover {
    color: var(--text-error);
    background-color: rgba(239, 68, 68, 0.1);
}

#switch-room-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    transition: color 0.2s, background-color 0.2s;
}

#switch-room-btn:hover {
    color: var(--input-focus);
    background-color: rgba(129, 140, 248, 0.1);
}

.room-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.room-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (min-width: 480px) {
    .room-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.room-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    transition: background-color var(--transition-speed), border-color var(--transition-speed), transform var(--transition-speed);
}

.room-card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--primary-accent);
    transform: translateY(-2px);
}

.room-card:active {
    transform: scale(0.98);
}

.room-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.room-card-pulse {
    margin-right: 0.25rem;
}

.room-card-hash {
    color: var(--primary-accent);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: bold;
}

.room-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.room-card-footer {
    display: flex;
    align-items: center;
}

.room-card-members {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}
}

/* Chat Main Panel */
.chat-area {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--bg-main);
    position: relative;
}

.chat-header {
    height: 64px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
}

.sidebar-toggle-btn {
    display: none;
    /* Hidden on desktop */
    background: transparent;
    border: none;
    color: var(--text-secondary);
    margin-right: 1rem;
    cursor: pointer;
    padding: 0.25rem;
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hash-tag {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-accent);
}

.channel-info h2 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.divider {
    color: var(--border-color);
    margin: 0 0.25rem;
}

.channel-desc {
    font-size: 0.813rem;
    color: var(--text-secondary);
}

/* Messages Viewport */
.messages-viewport {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Welcome Box inside viewport */
.welcome-box {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}

.welcome-icon-container {
    margin-bottom: 0.75rem;
}

.welcome-box h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-box p {
    font-size: 0.938rem;
    color: var(--text-secondary);
}

/* Message Bubble Structures */
.message-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    animation: slideUpFade 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.message-wrapper.self {
    align-self: flex-end;
    align-items: flex-end;
}

.message-wrapper.other {
    align-self: flex-end;
    align-self: flex-start;
    align-items: flex-start;
}

.message-meta {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    padding: 0 0.25rem;
}

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 14px;
    font-size: 0.938rem;
    line-height: 1.4;
    word-break: break-word;
    box-shadow: var(--shadow);
    position: relative;
    border: 1px solid var(--border-color);
}

.message-wrapper.self .message-bubble {
    background-color: var(--bg-bubble-self);
    color: var(--text-primary);
    border-color: rgba(96, 165, 250, 0.3);
    border-bottom-right-radius: 2px;
}

.message-wrapper.other .message-bubble {
    background-color: var(--bg-bubble-other);
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
}

/* Subtly display timestamps inside bubble or on hover */
.message-timestamp {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.688rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
    margin-top: 0.25rem;
}

.message-wrapper.other .message-timestamp {
    color: var(--text-muted);
}

/* System joined/left notifications */
.system-message {
    align-self: center;
    background-color: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-color);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.813rem;
    color: var(--text-secondary);
    text-align: center;
    box-shadow: var(--shadow);
    animation: fadeIn var(--transition-speed) ease forwards;
    margin: 0.5rem 0;
}

/* Chat Footer Input Section */
.chat-footer {
    padding: 1.5rem;
    background-color: var(--bg-main);
}

.input-wrapper {
    display: flex;
    background-color: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.25rem 0.5rem 0.25rem 1rem;
    align-items: center;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.input-wrapper:focus-within {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    padding: 0.75rem 0;
    font-size: 0.938rem;
}

.input-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.char-count.warning {
    color: #f59e0b;
    /* Amber */
}

.char-count.error {
    color: var(--text-error);
}

#chat-send-btn {
    background-color: var(--bg-bubble-self);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--transition-speed), opacity var(--transition-speed), transform 0.1s ease;
}

#chat-send-btn:hover:not(:disabled) {
    background-color: var(--accent-hover);
}

#chat-send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

#chat-send-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background-color: var(--bg-bubble-other);
}

/* Animations */
@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideUpFade {
    from {
        transform: translateY(8px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 768px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: absolute;
        left: 0;
        top: 64px;
        /* Align under header */
        bottom: 0;
        width: 260px;
        transform: translateX(-100%);
        /* Hidden by default */
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.4);
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
        /* Reveal */
    }

    .sidebar-toggle-btn {
        display: block;
        /* Show hamburger button */
    }

    .message-wrapper {
        max-width: 88%;
    }
}

/* Google Sign-In Button Container alignment helper */
#google-signin-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Reconnecting Banner */
.reconnect-banner {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(30, 41, 59, 0.95);
    /* Slate 800 */
    border: 1px solid var(--input-focus);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition-speed);
}

.reconnect-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-muted);
    border-top-color: var(--input-focus);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Rate Limit Warning Banner */
.rate-limit-banner {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    backdrop-filter: blur(12px);
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
    pointer-events: none;
    transition: opacity var(--transition-speed), transform var(--transition-speed);
}

/* Reaction Bar & Pills */
.reaction-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    position: relative;
    user-select: none;
}

.reaction-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.reaction-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: var(--bg-bubble-other);
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color var(--transition-speed), border-color var(--transition-speed), transform 0.1s ease;
}

.reaction-pill:hover {
    background-color: var(--border-color);
    transform: scale(1.05);
}

.reaction-pill.reacted {
    background-color: rgba(99, 102, 241, 0.15);
    border: 1px solid var(--bg-bubble-self);
    color: var(--text-primary);
}

.add-reaction-container {
    position: relative;
    display: inline-block;
}

.add-reaction-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-speed), background-color var(--transition-speed);
}

.add-reaction-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-bubble-other);
}

.emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 0.35rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.25rem;
    display: flex;
    gap: 0.25rem;
    box-shadow: var(--shadow-lg);
    z-index: 10;
    animation: scaleIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.message-wrapper.self .emoji-picker {
    left: auto;
    right: 0;
}

.emoji-picker-btn {
    background: transparent;
    border: none;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color var(--transition-speed), transform 0.1s ease;
}

.emoji-picker-btn:hover {
    background-color: var(--border-color);
    transform: scale(1.2);
}

/* Message actions (Edit / Delete) styles */
.message-actions {
    display: flex;
    gap: 4px;
    position: absolute;
    top: -12px;
    right: 12px;
    background-color: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 50;
}

.message-bubble:hover .message-actions {
    opacity: 1;
    pointer-events: auto;
}

.message-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-action-btn:hover {
    color: var(--text-primary);
    background-color: var(--border-color);
}

.message-action-btn.delete-btn:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.15);
}

/* Edit message inline input styles */
.edit-input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    min-width: 220px;
}

.message-edit-input {
    background-color: var(--bg-main);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.938rem;
    outline: none;
    width: 100%;
}

.message-edit-input:focus {
    border-color: var(--input-focus);
}

.edit-input-container-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.edit-input-container button {
    padding: 4px 10px;
    border-radius: 4px;
    border: none;
    font-size: 0.813rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.15s ease;
}

.edit-save-btn {
    background-color: var(--bg-bubble-self);
    color: white;
}

.edit-save-btn:hover {
    background-color: var(--accent-hover);
}

.edit-cancel-btn {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color) !important;
}

.edit-cancel-btn:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

/* Delete confirmation alert styles */
.delete-confirm-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.813rem;
    color: #fca5a5;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 6px 10px;
    border-radius: 6px;
    margin-top: 4px;
    animation: scaleIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delete-confirm-container button {
    padding: 2px 8px;
    border-radius: 4px;
    border: none;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 600;
}

.delete-confirm-yes {
    background-color: #ef4444;
    color: white;
}

.delete-confirm-yes:hover {
    background-color: #dc2626;
}

.delete-confirm-no {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color) !important;
}

.delete-confirm-no:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

/* Deleted message status styles */
.message-bubble.message-deleted {
    background-color: transparent !important;
    border: 1px dashed var(--border-color);
    color: var(--text-muted) !important;
}

.italic {
    font-style: italic;
}

.muted {
    color: var(--text-muted) !important;
}

.message-edited {
    font-size: 0.688rem;
    opacity: 0.75;
    font-style: italic;
}

/* Kick button & inline confirmation styles */
.kick-btn {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 4px;
    font-size: 0.75rem;
    padding: 2px 6px;
    cursor: pointer;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    margin-left: auto;
}

.kick-btn:hover {
    background-color: #ef4444;
    color: white;
}

.kick-confirm-container {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #fca5a5;
    margin-left: auto;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    animation: scaleIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.kick-confirm-container button {
    padding: 1px 4px;
    font-size: 0.7rem;
    cursor: pointer;
    border: none;
    border-radius: 2px;
}

.kick-confirm-yes {
    background-color: #ef4444;
    color: white;
}

.kick-confirm-yes:hover {
    background-color: #dc2626;
}

.kick-confirm-no {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color) !important;
}

.kick-confirm-no:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.reaction-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.typing-indicator {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.typing-indicator::before {
    content: '>';
    color: var(--primary-accent);
    font-weight: bold;
}

/* Animations */
@keyframes signal-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::after,
    *::before {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: scroll !important;
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }

    .status-indicator-dot.online::after,
    .room-card-pulse.online::after,
    .signal-pulse-dot.online::after {
        animation: none !important;
    }
}