/* ============================================================================ */
/* ARCHIVE VIEW */
/* ============================================================================ */

.archive-group {
    margin-bottom: var(--space-6);
}

.archive-group-header {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-light);
}

.archive-group-tasks {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.archive-task-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.archive-task-row:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-sm);
}

.archive-task-title {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    text-decoration: line-through;
}

.archive-restore-btn {
    padding: var(--space-1) var(--space-3);
    background: transparent;
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.archive-restore-btn:hover {
    background: var(--accent-fill);
    color: white;
}

/* ============================================================================ */
/* SETTINGS VIEW */
/* ============================================================================ */

.settings-view {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.settings-view h2 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-8);
}

.settings-section {
    margin-bottom: var(--space-8);
}

.settings-section h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
}

.setting-item label {
    font-size: var(--font-size-base);
    color: var(--text-primary);
}

.setting-item select {
    padding: var(--space-2) var(--space-3);
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    cursor: pointer;
}

.setting-item select:focus {
    outline: none;
    border-color: var(--accent-blue);
}

/* Calendar timeline element styles are defined in the Today View section above */

/* Account Tab - Danger Zone Styling */
.danger-section {
    margin-top: var(--space-8);
}

.danger-heading {
    color: var(--color-red-text);
    margin-bottom: var(--space-4);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-light);
}

.danger-zone {
    background: rgba(211, 47, 47, 0.05);
    border: 1px solid rgba(211, 47, 47, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.danger-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
}

.danger-info {
    flex: 1;
}

.danger-info strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.danger-info p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin: 0;
}

/* Modal Backdrop for floating modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-layer-modal);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Password/Delete Confirmation Modal */
.password-modal {
    max-width: 400px;
    width: 90%;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3);
}

.password-modal .modal-body p {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.password-input {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    background: var(--bg-main);
    color: var(--text-primary);
}

.password-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

.password-error {
    color: var(--color-red-text);
    font-size: var(--font-size-sm);
    margin-top: var(--space-2);
    min-height: 20px;
}

/* Spin animation for loading states */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* ============================================================================ */
/* RESPONSIVE BREAKPOINTS */
/* ============================================================================ */

/* Compact (Mobile) */
@media (max-width: 768px) {
    .projects-list,
    .notes-list {
        grid-template-columns: 1fr;
    }

    .notes-page-layout {
        flex-direction: column;
    }

    .notes-left-panel {
        width: 100%;
        flex-direction: column;
        overflow-y: auto;
        gap: var(--space-4);
        padding-bottom: var(--space-4);
        border-bottom: 1px solid var(--border-light);
    }

    .notes-smart-filters {
        flex-direction: row;
        gap: var(--space-2);
    }

    .notes-folders-section {
        display: none;
    }

    .command-bar {
        width: 90vw;
    }

    .projects-directory,
    .notes-view,
    .settings-view {
        padding: 0;
    }

    /* Interactive components - mobile */
    .columns-2,
    .columns-3 {
        grid-template-columns: 1fr;
    }

    .picker-modal {
        width: 95%;
        max-height: 80vh;
    }

    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
    }

    .video-embed iframe,
    .web-embed iframe {
        height: 250px;
    }

    .media-upload-modal-content {
        width: 95%;
    }
}

/* Regular (Tablet) */
@media (min-width: 769px) and (max-width: 1023px) {
    .projects-list,
    .notes-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Wide (Desktop) - default styles above */


/* ============================================================================ */
/* TASK QUICK ACTIONS (HOVER) */
/* ============================================================================ */

.task-quick-actions {
    gap: var(--space-2);
}

.task-row:hover .task-quick-actions {
    visibility: visible;
    opacity: 1;
}

.quick-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

.quick-action-btn:hover {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
}

.quick-action-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================================================ */
/* MODAL FULLSCREEN */
/* ============================================================================ */

.task-modal.fullscreen,
.event-modal.fullscreen,
.project-modal.fullscreen {
    position: fixed;
    top: 0;
    left: 68px;
    right: 0;
    bottom: 0;
    width: calc(100vw - 68px);
    height: 100vh;
    max-width: calc(100vw - 68px);
    max-height: 100vh;
    border-radius: 0;
    transform: none;
}

.task-modal.fullscreen .modal-body,
.event-modal.fullscreen .event-modal-content,
.project-modal.fullscreen .project-modal-content {
    max-height: calc(100vh - 120px);
}

/* ============================================================================ */
/* TASK ANIMATE IN - uses @keyframes taskSlideIn defined earlier */
/* ============================================================================ */

.task-animate-in {
    animation: taskSlideIn var(--duration-slow) var(--ease-in-out);
}

/* ============================================================================ */
/* SLASH MENU & FORMAT TOOLBAR POSITIONING */
/* ============================================================================ */

.slash-menu,
.format-toolbar {
    z-index: calc(var(--z-layer-modal) + 1);
}
