// Copyright (c) 2017-2025, CKSource Holding sp. z o.o. All rights reserved.
// For licensing, see LICENSE.md.

// Division using / is deprecated, math.div() has to be used instead.
// See: https://sass-lang.com/documentation/breaking-changes/slash-div

@use '~tippy.js/dist/tippy.css';
@use '~tippy.js/themes/light-border.css';
@use '~tippy.js/animations/scale.css';
@use 'font-external';
@use 'helpers/color';
@use 'helpers/font';
@use 'helpers/globals';
@use 'helpers/reset';
@use 'helpers/spacing';
@use 'sass:math';
@use 'sass:meta';

@mixin u-std-font {
	font-weight: 400;
	line-height: font.$u-line-height-base;
	font-family: font.$u-font-face;
	font-size: font.$u-font-size-base;
}

body, html {
	@include u-std-font;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	min-height: 100vh;
	width: 100%;
	overflow-x: hidden;
}

body {
	padding: globals.$u-top-height 0 0;
	color: color.u-color( text, 10% );

	@include globals.u-responsive-tablet {
		padding: globals.$u-top-main 0 0;
	}
}

button, input {
	@include u-std-font;
}

a {
	color: color.u-color( 'link' );
	text-decoration: none;

	&:hover {
		text-decoration: underline;
	}
}

.hidden-loading {
	display: none;
}

@include meta.load-css('tree');
@include meta.load-css('top');
@include meta.load-css('main');
@include meta.load-css('formatted');
@include meta.load-css('collapsinglist');
@include meta.load-css('footer');
@include meta.load-css('toggler');
@include meta.load-css('badge');
@include meta.load-css('dropdown');
@include meta.load-css('secondary-navigation');
@include meta.load-css('docsearch');
@include meta.load-css('loading-spinner');
// PAGES

// GUIDES
@include meta.load-css('notice');
@include meta.load-css('guide-sdk-tree');
@include meta.load-css('guide-content');

// API
@include meta.load-css('api-content');
@include meta.load-css('api-info-box');
@include meta.load-css('api-props-filter');
@include meta.load-css('api-tree');
@include meta.load-css('api-subheader');
@include meta.load-css('api-see-source');

// RWD
@include meta.load-css('rwd-menu');
@include meta.load-css('rwd-breadcrumbs');

// SDK
@include meta.load-css('pages/sdk');

// External Styles
@include meta.load-css('prism');

// Dark mode
@include meta.load-css('theme-dark');

// Dedicated print styles
@include meta.load-css('print');

// Components
@include meta.load-css('feedback-widget');

// Lightbox plugin for {@img ... } element
@include meta.load-css('components/lightbox');

// Toolbar icons inside guides.
@include meta.load-css("editor-icon");

// The warning banner feature (displayed in the header).
@include meta.load-css("warning-banner");

// The code switcher component
@include meta.load-css("code-switcher");
