/* Using a more modern font */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #0D1117; /* brand-bg */
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

/* Custom scrollbar for a modern look */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #161B22; /* brand-surface */
}
::-webkit-scrollbar-thumb {
    background: #30363D; /* brand-border */
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8B949E; /* brand-text-muted */
}

/* Glow effect for the online indicator */
.glow {
  box-shadow: 0 0 6px #56d364, 0 0 10px #56d364; /* green color */
}

.brand-gradient {
    background-image: linear-gradient(to right, #8B5CF6, #4F46E5);
}

/* Subtle background pattern for chat */
.chat-bg {
    background-color: #0D1117;
    background-image: radial-gradient(#30363D 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Sticky chat header for better UX */
#chat-header {
	position: sticky;
	top: 0;
	z-index: 20;
	backdrop-filter: blur(6px);
	background-color: rgba(22, 27, 34, 0.85);
}

/* Message bubble animation */
.message-bubble-wrapper {
    animation: slideIn 0.3s ease-out forwards;
}

/* Subtle depth and spacing for message bubbles */
.message-bubble-wrapper > div {
	box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.message-bubble-wrapper + .message-bubble-wrapper {
	margin-top: 0.25rem;
}

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

/* Entry animations for modal and toast */
.hidden {
    display: none;
}

/* Modal animation */
#request-modal:not(.hidden) {
    display: flex;
    animation: fadeIn 0.3s ease-out forwards;
}
.modal-content {
    background-color: #161B22; /* brand-surface */
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    max-width: 24rem;
    margin: 1rem;
    border: 1px solid #30363D; /* brand-border */
    transform: scale(0.95);
    animation: scaleIn 0.3s ease-out forwards;
	backdrop-filter: blur(8px);
}

/* Toast animation */
#toast:not(.hidden) {
    display: block;
    animation: slideDownToast 0.4s ease-out forwards;
}

#toast {
	backdrop-filter: blur(6px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes slideDownToast {
    from { transform: translateY(-1rem); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Style for the user list item */
.user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem; /* 12px */
    border-radius: 0.5rem; /* 8px */
    transition: all 0.2s ease-in-out;
    border-left: 2px solid transparent;
}
.user-item:hover {
    background-color: #0D1117; /* brand-bg */
    border-left-color: #8B5CF6; /* brand-primary */
}

/* Chat Input Field styles */
.chat-input-field {
    flex-grow: 1;
    background-color: #0D1117;
    border: 1px solid #30363D;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: #C9D1D9;
    transition: all 0.2s ease-in-out;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.chat-input-field::placeholder {
	color: #6B7280;
}
.chat-input-field:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3), inset 0 1px 2px rgba(0,0,0,0.2);
}


/* Specific button styles */
.request-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    color: white;
    background-image: linear-gradient(to right, #8B5CF6, #4F46E5);
    transition: all 0.2s ease-in-out;
}
.request-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px -3px rgba(124, 58, 237, 0.4);
}
.request-btn:disabled {
    background-image: none;
    background-color: #4B5563; /* gray-600 */
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.accept-btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    color: white;
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
    background-color: #16A34A; /* green-600 */
}
.accept-btn:hover {
    background-color: #15803D; /* green-700 */
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.decline-btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    color: white;
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
    background-color: #4B5563; /* gray-600 */
}
.decline-btn:hover {
    background-color: #6B7280; /* gray-500 */
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.end-chat-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    color: white;
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
    background-color: #DC2626; /* red-600 */
}
.end-chat-btn:hover {
    background-color: #B91C1C; /* red-700 */
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Better focus styles for keyboard users */
:focus-visible {
	outline: 2px solid #8B5CF6;
	outline-offset: 2px;
}

