/*
Theme Name: TIN
Description: Child theme of Greyd WP for the TIN website. Put all site-specific code and CSS here, never in the parent theme.
Template: greyd-wp
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tin
*/

/**
 * Corner smoothing (squircle corners)
 * ____________________________________________________________________
 *
 * Every rounded element gets smoothed "squircle" corners in browsers that
 * support `corner-shape` (Chrome 139+). `corner-shape` does nothing when the
 * radius is 0, so the rule is safe on every element. Other browsers ignore it
 * and keep the plain `border-radius`.
 *
 * A squircle looks tighter than a round corner at the same radius, so the
 * Greyd button and input radius tokens are scaled ×1.714 for supporting
 * browsers in inc/corner-smoothing.php.
 *
 * `:where()` keeps specificity at 0, so any rule can override it. Circles and
 * pills are set back to `round`: a squircle would flatten their ends. Add any
 * new circular element to this list.
 */
@supports (corner-shape: squircle) {
	:where(*, *::before, *::after) {
		corner-shape: squircle;
	}

	:where(
		.wp-block-image.is-style-rounded img,
		.wp-block-avatar img,
		.avatar,
		.wp-social-link,
		.popover-close-button,
		.dot-loader,
		.loading_spinner > div,
		.flatpickr-day,
		input[type="radio"],
		[style*="999px"],
		[style*="50%"]
	) {
		corner-shape: round;
	}
}
