/**
 * Telegram WebApp Theme
 * CSS переменные из Telegram автоматически подхватываются
 */

:root {
    /* Telegram theme colors (fallback values) */
    --tg-theme-bg-color: #ffffff;
    --tg-theme-text-color: #000000;
    --tg-theme-hint-color: #999999;
    --tg-theme-link-color: #2481cc;
    --tg-theme-button-color: #2481cc;
    --tg-theme-button-text-color: #ffffff;
    --tg-theme-secondary-bg-color: #f0f0f0;
    --tg-theme-header-bg-color: #ffffff;
    --tg-theme-accent-text-color: #2481cc;
    --tg-theme-section-bg-color: #ffffff;
    --tg-theme-section-header-text-color: #999999;
    --tg-theme-subtitle-text-color: #999999;
    --tg-theme-destructive-text-color: #ff3b30;

    /* App-specific colors */
    --color-success: #34c759;
    --color-warning: #ff9500;
    --color-danger: #ff3b30;

    /* Priority colors */
    --priority-high: #ff3b30;
    --priority-medium: #ff9500;
    --priority-low: #34c759;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;

    /* Safe area (для iPhone с notch) */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* Dark theme adjustments */
@media (prefers-color-scheme: dark) {
    :root {
        --tg-theme-bg-color: #1c1c1e;
        --tg-theme-text-color: #ffffff;
        --tg-theme-hint-color: #8e8e93;
        --tg-theme-secondary-bg-color: #2c2c2e;
        --tg-theme-section-bg-color: #2c2c2e;
    }
}
