/* Base Styles - Variables, Reset, Typography */

:root {
    --primary-color: #1a73e8;
    --primary-hover: #1557b0;
    --danger-color: #ea4335;
    --danger-hover: #c5221f;
    --success-color: #34a853;
    --warning-color: #fbbc04;
    --bg-color: #f6f8fc;
    --sidebar-bg: #f6f8fc;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-muted: #80868b;
    --hover-bg: #f1f3f4;
    --active-bg: #e8f0fe;
    --shadow-sm: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
    --shadow-md: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Utilities */
.hidden {
    display: none !important;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-full);
}

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

/* Spinner Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Deleting State - Blue to indicate in-progress */
.btn-deleting {
    background: #3b82f6 !important;
    color: white !important;
    cursor: wait !important;
    opacity: 1 !important;
}

.btn-deleting:hover {
    background: #2563eb !important;
}

/* Bulk Delete Overlay */
.delete-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.delete-overlay-content {
    background: var(--card-bg);
    padding: 32px 48px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 2px solid #3b82f6;
    min-width: 320px;
}

.delete-overlay-spinner {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.delete-overlay h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.delete-overlay p {
    font-size: 14px;
    color: var(--text-secondary);
}

.delete-progress-container {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin: 16px 0;
}

.delete-progress-bar {
    height: 100%;
    background: #3b82f6;
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.delete-stats {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Info Note */
.info-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
    color: #1e40af;
}

.info-note svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #3b82f6;
}

/* Download Overlay */
.download-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16, 185, 129, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.download-overlay-content {
    background: var(--card-bg);
    padding: 32px 48px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 2px solid #10b981;
    min-width: 320px;
}

.download-overlay-spinner {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.download-overlay h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.download-progress-container {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin: 16px 0;
}

.download-progress-bar {
    height: 100%;
    background: #10b981;
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.download-overlay p {
    font-size: 14px;
    color: var(--text-secondary);
}

.download-stats {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

.download-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
    font-style: italic;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 420px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-content {
    flex: 1;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.toast-tip {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    opacity: 0.6;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}
