/**
 * CSS At-Rule Types
 *
 * Structured types for CSS at-rules (@keyframes, @media, @font-face, etc.)
 * that cannot be expressed in the selector+declarations format of CustomCssRule.
 *
 * Security: @import is blocked to prevent loading external stylesheets.
 */
/**
 * Base interface for all at-rule types.
 */
export interface CustomCssAtRuleBase {
    /** Unique identifier for deterministic diffs */
    id: string;
}
/**
 * @keyframes animation definition.
 *
 * @example
 * {
 *   id: 'fade-in',
 *   type: 'keyframes',
 *   name: 'fadeIn',
 *   frames: [
 *     { offset: '0%', declarations: { opacity: '0' } },
 *     { offset: '100%', declarations: { opacity: '1' } },
 *   ],
 * }
 */
export interface KeyframesAtRule extends CustomCssAtRuleBase {
    type: 'keyframes';
    /** Animation name (alphanumeric, dashes, underscores) */
    name: string;
    /** Keyframe definitions */
    frames: Array<{
        /** Keyframe offset: "0%", "50%", "100%", "from", "to" */
        offset: string;
        /** CSS declarations for this keyframe */
        declarations: Record<string, string>;
    }>;
}
/**
 * @font-face declaration.
 *
 * @example
 * {
 *   id: 'custom-font',
 *   type: 'font-face',
 *   declarations: {
 *     fontFamily: 'MyFont',
 *     src: 'url(/fonts/myfont.woff2) format("woff2")',
 *     fontWeight: '400',
 *   },
 * }
 */
export interface FontFaceAtRule extends CustomCssAtRuleBase {
    type: 'font-face';
    /** Font-face declarations (font-family, src, font-weight, etc.) */
    declarations: Record<string, string>;
}
/**
 * @media query with nested rules.
 * Nested rule selectors are theme-scoped for isolation.
 *
 * @example
 * {
 *   id: 'mobile-styles',
 *   type: 'media',
 *   query: '(max-width: 768px)',
 *   rules: [
 *     { selector: '.hero-title', declarations: { fontSize: '24px' } },
 *   ],
 * }
 */
export interface MediaAtRule extends CustomCssAtRuleBase {
    type: 'media';
    /** Media query condition (e.g., "(min-width: 768px)") */
    query: string;
    /** Nested CSS rules (selectors will be theme-scoped) */
    rules: Array<{
        selector: string;
        declarations: Record<string, string>;
    }>;
}
/**
 * @supports feature query with nested rules.
 * Nested rule selectors are theme-scoped for isolation.
 *
 * @example
 * {
 *   id: 'grid-support',
 *   type: 'supports',
 *   condition: '(display: grid)',
 *   rules: [
 *     { selector: '.container', declarations: { display: 'grid' } },
 *   ],
 * }
 */
export interface SupportsAtRule extends CustomCssAtRuleBase {
    type: 'supports';
    /** Feature query condition (e.g., "(display: grid)") */
    condition: string;
    /** Nested CSS rules (selectors will be theme-scoped) */
    rules: Array<{
        selector: string;
        declarations: Record<string, string>;
    }>;
}
/**
 * Raw CSS at-rule for edge cases not covered by typed variants.
 * @import is blocked for security.
 *
 * @example
 * {
 *   id: 'container-query',
 *   type: 'raw',
 *   css: '@container (min-width: 400px) { .card { padding: 2rem; } }',
 * }
 */
export interface RawAtRule extends CustomCssAtRuleBase {
    type: 'raw';
    /** Raw CSS (no @import allowed) */
    css: string;
}
/**
 * Discriminated union of all at-rule types.
 */
export type CustomCssAtRule = KeyframesAtRule | FontFaceAtRule | MediaAtRule | SupportsAtRule | RawAtRule;
