@use "sass:map";
@use "../core/_index.scss" as *;
@use "../button/_variables.scss" as *;

/// The horizontal padding of the Card.
/// @group card
$kendo-card-padding-x: k-spacing(3) !default;
/// The vertical padding of the Card.
/// @group card
$kendo-card-padding-y: k-spacing(3) !default;
/// The width of the border around the Card.
/// @group card
$kendo-card-border-width: 0px !default;
/// The border radius of the Card.
/// @group card
$kendo-card-border-radius: k-border-radius(md) !default;
/// The inner border radius of the Card.
/// @group card
$kendo-card-inner-border-radius: calc( #{$kendo-card-border-radius} - #{$kendo-card-border-width} ) !default;
/// The font family of the Card.
/// @group card
$kendo-card-font-family: var( --kendo-font-family, inherit ) !default;
/// The font size of the Card.
/// @group card
$kendo-card-font-size: var( --kendo-font-size-sm, inherit ) !default;
/// The line height of the Card.
/// @group card
$kendo-card-line-height: var( --kendo-line-height, normal ) !default;

/// The spacing between the Cards in the Card deck.
/// @group card
$kendo-card-deck-gap: k-spacing(4) !default;

/// The background color of the Card.
/// @group card
$kendo-card-bg: var( --kendo-component-bg, initial ) !default;
/// The text color of the Card.
/// @group card
$kendo-card-text: var( --kendo-component-text, initial ) !default;
/// The border color of the Card.
/// @group card
$kendo-card-border: var( --kendo-component-border, initial ) !default;
/// The shadow of the Card.
/// @group card
$kendo-card-shadow: var( --kendo-box-shadow-depth-1, none ) !default;

/// The background color of the focused Card.
/// @group card
$kendo-card-focus-bg: $kendo-card-bg !default;
/// The text color of the focused Card.
/// @group card
$kendo-card-focus-text: null !default;
/// The border color of the focused Card.
/// @group card
$kendo-card-focus-border: var( --kendo-component-border, initial ) !default;
/// The shadow of the focused Card.
/// @group card
$kendo-card-focus-shadow: var( --kendo-box-shadow-depth-3, none ) !default;

/// The font size of the Card header.
/// @group card
$kendo-card-header-font-size: var( --kendo-font-size-lg, inherit ) !default;
/// Тhe font family of the Card header.
/// @group card
$kendo-card-header-font-family: var( --kendo-font-family, inherit ) !default;
/// The font weight of the Card header.
/// @group card
$kendo-card-header-font-weight: var( --kendo-font-weight, initial ) !default;
/// The line height of the Card header.
/// @group card
$kendo-card-header-line-height: var( --kendo-line-height, normal ) !default;
/// The horizontal padding of the Card header.
/// @group card
$kendo-card-header-padding-x: k-spacing(3) !default;
/// The vertical padding of the Card header.
/// @group card
$kendo-card-header-padding-y: k-spacing(3) !default;
/// The bottom border width of the Card header.
/// @group card
$kendo-card-header-border-width: 0 !default;
/// The background color of the Card header.
/// @group card
$kendo-card-header-bg: inherit !default;
/// The text color of the Card header.
/// @group card
$kendo-card-header-text: if($kendo-enable-color-system, k-color( on-app-surface ), k-get-theme-color-var( neutral-190 )) !default; // header-text
/// The border color of the Card header.
/// @group card
$kendo-card-header-border: inherit !default; // header-border

/// The horizontal padding of the Card body.
/// @group card
$kendo-card-body-padding-x: k-spacing(3) !default;
/// The vertical padding of the Card body.
/// @group card
$kendo-card-body-padding-y: k-spacing(3) !default;

/// The horizontal padding of the Card footer.
/// @group card
$kendo-card-footer-padding-x: $kendo-card-padding-x !default;
/// The vertical padding of the Card footer.
/// @group card
$kendo-card-footer-padding-y: $kendo-card-padding-y !default;
/// The top border width of the Card footer.
/// @group card
$kendo-card-footer-border-width: 0 !default;
/// The background color of the Card footer.
/// @group card
$kendo-card-footer-bg: inherit !default;
/// The text color of the Card footer.
/// @group card
$kendo-card-footer-text: inherit !default; // $kendo-component-header-text
/// The border color of the Card footer.
/// @group card
$kendo-card-footer-border: inherit !default; // $kendo-component-header-border

/// The font size of the Card title.
/// @group card
$kendo-card-title-font-size: var( --kendo-font-size-lg, inherit ) !default;
/// The font family of the Card title.
/// @group card
$kendo-card-title-font-family: var( --kendo-font-family, inherit ) !default;
/// The font weight of the Card title.
/// @group card
$kendo-card-title-font-weight: $kendo-card-header-font-weight !default;
/// The line height of the Card title.
/// @group card
$kendo-card-title-line-height: var( --kendo-line-height, normal ) !default;
/// The bottom margin of the Card title.
/// @group card
$kendo-card-title-margin-bottom: k-spacing(3) !default;
/// The font size of the Card subtitle.
/// @group card
$kendo-card-subtitle-font-size: var( --kendo-font-size-sm, inherit ) !default;
/// The font family of the Card subtitle.
/// @group card
$kendo-card-subtitle-font-family: var( --kendo-font-family, inherit ) !default;
/// The line height of the Card subtitle.
/// @group card
$kendo-card-subtitle-line-height: var( --kendo-line-height, normal ) !default;
/// The bottom margin of the Card subtitle.
/// @group card
$kendo-card-subtitle-margin-bottom: k-spacing(3) !default;
/// The text color of the Card subtitle.
/// @group card
$kendo-card-subtitle-text: $kendo-subtle-text !default;

/// The maximum width of the Card image.
/// @group card
$kendo-card-img-max-width: 100px !default;
/// The size of the Avatar in the Card.
/// @group card
$kendo-card-avatar-size: 3rem !default;
/// The spacing between the Avatar and the text in the Card.
/// @group card
$kendo-card-avatar-spacing: $kendo-card-header-padding-x !default;

/// The horizontal padding of the Card actions.
/// @group card
$kendo-card-actions-padding-x: k-spacing(3) !default;
/// The vertical padding of the Card actions.
/// @group card
$kendo-card-actions-padding-y: k-spacing(3) !default;
/// The top border width of the Card actions.
/// @group card
$kendo-card-actions-border-width: 0 !default;
/// The spacing between the Card actions.
/// @group card
$kendo-card-actions-gap: k-spacing(2) !default;

/// The border radius of the scroll button in the Card deck.
/// @group card
$kendo-card-deck-scroll-button-radius: 0 !default;
/// The border radius of the scroll button in the Card deck.
/// @group card
$kendo-card-deck-scroll-button-offset: ( -1 * $kendo-button-border-width ) !default;

/// The size of the Card callout.
/// @group card
$kendo-card-callout-size: 20px !default;

/// Theme variations for the card.
$kendo-card-brand-colors: ( primary, error, warning, success, info ) !default;

// Matrix with card theme colors in the order: bg, color, border
$_tc-card-matrix: (
    (normal: if($kendo-enable-color-system, (color-subtle, color-on-subtle, color-subtle), (20, 160, 20))),
) !default;

/// Theme colors map for the card variations.
$kendo-card-theme-colors: () !default;

@each $ui-states in $_tc-card-matrix {
    @each $brand-color in $kendo-card-brand-colors {
        $kendo-card-theme-colors: map.deep-merge(
            $kendo-card-theme-colors,
            k-generate-theme-variation( $brand-color, $brand-color, $ui-states )
        );
    };
}
