/* PawLog Components CSS - Buttons, Forms, Cards, Modals */

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    letter-spacing: -0.01em;
    min-height: 44px;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--color-border);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: var(--color-text-secondary);
    color: var(--color-surface);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-danger {
    background: var(--color-error);
    color: white;
}

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

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: var(--color-border);
}

.btn-icon svg {
    width: 24px;
    height: 24px;
}

.btn-icon.btn-delete {
    color: var(--color-error);
}

/* AI Assistant Icon Button */
.btn-icon.action-ai {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-icon.action-ai:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-icon.action-ai svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Button loading state */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
    color: white;
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================================
   Forms
   ============================================================================ */

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-group label .required {
    color: var(--color-error);
    margin-left: 2px;
}

.form-group label .label-hint {
    font-weight: 400;
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
}

.form-help {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    margin-top: 0.375rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--color-background);
    color: var(--color-text);
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-surface);
}

/* Template fields styling */
.template-fields {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}

.template-fields-header {
    margin-bottom: 1rem;
}

.template-fields-header h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9375rem;
    color: var(--color-text);
}

.template-fields-header p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

/* Tags input wrapper */
.tags-input-wrapper {
    position: relative;
}

.generated-tags-preview {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(var(--color-primary-rgb), 0.08);
    border-radius: 8px;
}

.generated-tags-preview small {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.generated-tags-preview .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.generated-tags-preview .tag {
    padding: 0.25rem 0.625rem;
    background: var(--color-primary);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 1.5rem 0;
}

.error-message {
    color: var(--color-error);
    padding: 0.75rem;
    background: rgba(255, 59, 48, 0.1);
    border-radius: 10px;
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Input with icon (for PIN toggle) */
.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon .form-input {
    padding-right: 3rem;
}

.input-icon-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon-btn:hover {
    color: var(--color-text);
}

.input-icon-btn svg {
    width: 20px;
    height: 20px;
}

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

.welcome-card {
    background: var(--color-surface);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    margin-bottom: 1rem;
}

.welcome-card h2 {
    color: var(--color-text);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.welcome-card p {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
}

/* ============================================================================
   Modals
   ============================================================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-sheet {
    background: var(--color-surface);
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    padding-bottom: var(--safe-area-bottom);
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Drag handle for bottom sheets */
.modal-sheet::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 5px;
    background: var(--color-text-secondary);
    opacity: 0.3;
    border-radius: 3px;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

/* Desktop: centered modal instead of bottom sheet */
@media (min-width: 768px) {
    .modal-overlay {
        align-items: center;
    }

    .modal-sheet {
        border-radius: var(--card-radius);
        max-width: 600px;
        max-height: 85vh;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        animation: scaleIn 0.2s cubic-bezier(0.32, 0.72, 0, 1);
    }

    .modal-sheet::before {
        display: none;
    }

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

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

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

.modal-header h2 {
    color: var(--color-text);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: var(--color-border);
    border: none;
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--color-text-secondary);
    color: var(--color-surface);
}

.modal-body {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    padding-bottom: calc(1rem + var(--safe-area-bottom));
    border-top: 1px solid var(--color-border);
}

.modal-actions .btn {
    flex: 1;
}

/* Form styles for modals */
.modal-form .form-group {
    margin-bottom: 1rem;
}

.modal-form label {
    display: block;
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.modal-form input,
.modal-form textarea,
.modal-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--color-background);
    color: var(--color-text);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

/* Fix for date/time picker alignment */
.modal-form input[type="date"],
.modal-form input[type="time"],
.modal-form input[type="datetime-local"] {
    display: block;
    min-width: 0;
}

.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.modal-form textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

/* Confirm Modal */
.modal-small {
    max-width: 400px;
}

.modal-small .modal-body p {
    margin: 0;
    color: var(--color-text);
}

/* ============================================================================
   Media Components
   ============================================================================ */

.event-media-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.event-media-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.event-media-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--color-text);
}

.event-media-strip {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.event-media-strip::-webkit-scrollbar {
    height: 6px;
}

.event-media-strip::-webkit-scrollbar-track {
    background: var(--color-border);
    border-radius: 3px;
}

.event-media-strip::-webkit-scrollbar-thumb {
    background: var(--color-text-secondary);
    border-radius: 3px;
}

.media-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    position: relative;
    background: var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-thumbnail.file-icon {
    flex-direction: column;
    padding: 1rem;
    text-align: center;
}

.media-thumbnail.file-icon svg {
    width: 48px;
    height: 48px;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.media-thumbnail.file-icon .filename {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.media-thumbnail.uploading {
    opacity: 0.6;
    pointer-events: none;
}

.media-thumbnail.uploading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.event-media-strip:empty::before {
    content: 'No photos yet';
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

/* Media Viewer Modal */
.media-viewer {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
}

.media-viewer img {
    max-width: 100%;
    max-height: calc(90vh - 60px);
    object-fit: contain;
    touch-action: pinch-zoom;
}

.media-viewer-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.media-viewer-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.media-viewer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.media-viewer-actions span {
    font-size: 0.875rem;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* ============================================================================
   AI Chat Components
   ============================================================================ */

.add-mode-selection {
    display: flex;
    gap: 12px;
    padding: 8px 0;
}

.mode-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-btn:hover {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: white;
}

.mode-btn svg {
    width: 32px;
    height: 32px;
    stroke: currentColor;
}

.mode-btn span {
    font-weight: 500;
    font-size: 14px;
}

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
    padding: 8px 0;
    scroll-behavior: smooth;
}

/* Custom scrollbar for chat */
.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 10px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-secondary);
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 4px;
}

.chat-message {
    display: flex;
    gap: 10px;
    animation: fadeInChat 0.3s ease-in;
    align-items: flex-start;
}

@keyframes fadeInChat {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.chat-message.assistant .chat-message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.chat-message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 75%;
    word-wrap: break-word;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-message.user .chat-message-bubble {
    background: var(--color-primary);
    color: white;
    border-bottom-right-radius: 6px;
}

.chat-message.assistant .chat-message-bubble {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-bottom-left-radius: 6px;
}

/* Typing indicator */
.chat-message.typing-indicator .chat-message-bubble {
    padding: 16px 18px;
}

.typing-dots {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--color-text-secondary);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Draft card */
.draft-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px solid var(--color-primary);
    border-radius: 16px;
    padding: 18px;
    animation: slideUpDraft 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

@keyframes slideUpDraft {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.draft-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.draft-icon-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.draft-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.draft-title {
    font-weight: 700;
    font-size: 17px;
    color: var(--color-text);
}

.draft-datetime {
    font-size: 13px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.draft-body {
    margin: 12px 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.draft-body strong {
    color: var(--color-text);
    font-weight: 600;
}

.draft-body ul {
    margin-left: 20px;
    margin-top: 8px;
}

.draft-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.draft-actions .btn {
    flex: 1;
    min-width: fit-content;
}

/* AI Chat Modal Specific Styling */
#ai-chat-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 1.25rem;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
}

#ai-chat-modal .modal-header h2 {
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

#ai-chat-modal .modal-header h2::before {
    content: '🐾';
    font-size: 24px;
}

#ai-chat-modal .modal-close {
    color: white;
    opacity: 0.9;
}

#ai-chat-modal .modal-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

/* Empty state for AI chat */
.chat-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-secondary);
}

.chat-empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.chat-empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--color-text);
}

.chat-empty-state p {
    font-size: 14px;
    line-height: 1.5;
}

/* ============================================================================
   Welcome Overlay for New Users
   ============================================================================ */

.welcome-modal {
    background: var(--color-surface);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 480px;
    width: 90%;
    margin: auto;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: welcomeSlideUp 0.4s ease-out;
}

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

.welcome-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.welcome-icon {
    font-size: 64px;
    animation: welcomeBounce 0.6s ease-out;
}

@keyframes welcomeBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.welcome-content h2 {
    font-size: 2rem;
    margin: 0;
    color: var(--color-text);
    font-weight: 700;
}

.welcome-content p {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.6;
}

.welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

@media (max-width: 480px) {
    .welcome-modal {
        padding: 2rem 1.5rem;
    }
    
    .welcome-content h2 {
        font-size: 1.75rem;
    }
}

.draft-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.draft-actions .btn-primary {
    margin-left: auto;
}

/* Chat input */
.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 16px 0 0;
    border-top: 1px solid var(--color-border);
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 24px;
    font-size: 15px;
    background: var(--color-surface);
    color: var(--color-text);
    outline: none;
    transition: all 0.2s;
    resize: none;
    max-height: 120px;
}

.chat-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.chat-send-btn svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dark mode modal fixes */
@media (prefers-color-scheme: dark) {

    /* Modal text colors */
    .modal-header h2,
    .modal-body,
    .modal-body p,
    .modal-body label,
    .modal-body h2,
    .modal-body h3,
    .modal-body h4,
    .modal-body span,
    .modal-form label,
    .event-detail-title,
    .event-detail-body,
    .draft-title,
    .draft-body {
        color: var(--color-text);
    }

    /* Modal form inputs */
    .modal-form input,
    .modal-form textarea,
    .modal-form select,
    .form-input {
        background: var(--color-background);
        color: var(--color-text);
        border-color: var(--color-border);
    }

    .modal-form input::placeholder,
    .modal-form textarea::placeholder {
        color: var(--color-text-secondary);
    }

    /* Modal overlay darker for dark mode */
    .modal-overlay {
        background: rgba(0, 0, 0, 0.6);
    }

    /* Calendar modal text */
    .calendar-day-number,
    #calendar-month-title {
        color: var(--color-text);
    }

    /* Chat message bubble colors */
    .chat-message.assistant .chat-message-bubble {
        background: rgba(255, 255, 255, 0.1);
        color: var(--color-text);
    }
}

/* ============================================================================
   Media Upload in Add Event Modal
   ============================================================================ */

.event-media-upload-area {
    margin-top: 0.5rem;
}

.btn-upload-media {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border: 2px dashed var(--color-border);
    border-radius: 12px;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
    font-size: 0.9375rem;
    font-weight: 500;
}

.btn-upload-media:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(0, 122, 255, 0.05);
}

.btn-upload-media svg {
    width: 20px;
    height: 20px;
}

.media-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.media-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-border);
}

.media-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    transition: background 0.2s;
}

.media-preview-remove:hover {
    background: rgba(255, 59, 48, 0.9);
}

/* ============================================================================
   Notifications List
   ============================================================================ */

.notifications-list {
    max-height: 500px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.notification-item:hover {
    background: var(--color-background);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.read {
    opacity: 0.6;
}

.notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.notification-body {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
}

.notification-unread-dot {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
}