/*
 * Ghekko YOOtheme Max Grid – element styles.
 * Colours follow the YOOtheme style through currentColor and UIkit classes;
 * the accent colour is the --gmg-accent variable (element/item setting).
 *
 * Copyright (C) 2026 Ghekko Dev – GNU General Public License version 2 or later
 */

.gmg {
	--gmg-accent-default: #e62852;
	--gmg-line: color-mix(in srgb, currentColor 14%, transparent);
	--gmg-soft: color-mix(in srgb, currentColor 5%, transparent);
}

.gmg-item {
	position: relative;
	--gmg-accent-color: var(--gmg-accent, var(--gmg-accent-default));
}

/* Accent text */
.gmg-text-accent { color: var(--gmg-accent, var(--gmg-accent-default)) !important; }

/* Colours from the "colour" notation */
.gmg-paint-text.gmg-custom-color,
.gmg-paint-outline.gmg-custom-color { color: var(--gmg-color) !important; }
.gmg-paint-fill.gmg-custom-color { background: var(--gmg-color) !important; border-color: var(--gmg-color) !important; color: var(--gmg-contrast, #fff) !important; }

/* ------------------------------------------------------------------------
 * Title, version, badge
 * --------------------------------------------------------------------- */
.gmg-title { overflow-wrap: anywhere; }
.gmg-title .gmg-separator { opacity: .8; }
.gmg-version { font-weight: inherit; }
.gmg-title .gmg-version:not([class*="uk-text-"]):not([class*="uk-h"]):not([class*="uk-heading"]) { font-size: .75em; }
.gmg-version-prefix { font-weight: inherit; }
.gmg-badge { vertical-align: middle; }
.gmg-badge-text { font-size: .6em; font-weight: 500; vertical-align: baseline; }
.gmg-version-line .gmg-badge-text { font-size: .85em; }
.gmg-badge.uk-label { font-size: .5em; vertical-align: middle; }
.gmg-version-line .gmg-badge.uk-label { font-size: .75rem; }

/* ------------------------------------------------------------------------
 * Highlight label
 * --------------------------------------------------------------------- */
.gmg-highlight {
	display: inline-flex;
	align-items: center;
	gap: .35em;
	padding: .3em .8em;
	border-radius: 999px;
	font-size: .75rem;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: .02em;
	text-transform: uppercase;
	z-index: 1;
}
.gmg-highlight-top-right,
.gmg-highlight-top-left { position: absolute; top: 12px; }
.gmg-highlight-top-right { right: 12px; }
.gmg-highlight-top-left { left: 12px; }
.gmg-highlight-above { margin-bottom: 10px; }
.uk-panel.gmg-has-highlight { padding-top: 2.25rem; }

/* Space between the corner label and the content below it. */
.gmg-has-highlight { --gmg-highlight-space: 1.25rem; }
.gmg-highlight-space-none { --gmg-highlight-space: 0px; }
.gmg-highlight-space-small { --gmg-highlight-space: .5rem; }
.gmg-highlight-space-large { --gmg-highlight-space: 2rem; }
.gmg-highlight-space-xlarge { --gmg-highlight-space: 3rem; }
.gmg-item.gmg-has-highlight > :first-child:not(.gmg-media-top):not(.gmg-highlight) { margin-top: var(--gmg-highlight-space) !important; }

/* ------------------------------------------------------------------------
 * Detail rows and values
 * --------------------------------------------------------------------- */
.gmg-details { display: flex; flex-direction: column; gap: 12px; }
.gmg-details-gap-small { gap: 6px; }
.gmg-details-gap-medium { gap: 18px; }
.gmg-details-gap-large { gap: 26px; }

.gmg-detail { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; row-gap: 6px; }
.gmg-details-stacked .gmg-detail { flex-direction: column; align-items: flex-start; }
.gmg-details-table { display: grid; grid-template-columns: var(--gmg-label-width, max-content) 1fr; column-gap: 16px; }
.gmg-details-table .gmg-detail { display: contents; }
.gmg-details-table .gmg-detail-label { align-self: center; }

.gmg-detail-values { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gmg-detail-text .gmg-detail-values { display: inline; }

.gmg-v {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4em;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none !important;
	transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
a.gmg-v:hover { transform: translateY(-1px); opacity: .92; }
.gmg-v-text { white-space: normal; }
.gmg-v .gmg-icon > svg { width: 1.05em; height: 1.05em; }

.gmg-v-pill,
.gmg-v-outline,
.gmg-v-square { padding: .45em .85em; font-weight: 600; border-radius: 999px; }
.gmg-v-square { border-radius: 4px; }
.gmg-v-outline { border: 1px solid currentColor; background: transparent; }
.gmg-v-circle {
	width: 2.1em;
	height: 2.1em;
	padding: 0;
	border-radius: 50%;
	font-weight: 700;
}
.gmg-v-label { vertical-align: middle; }
.gmg-v-icon .gmg-icon > svg { width: 1.4em; height: 1.4em; }


/* Size: --gmg-v-size per size option, --gmg-v-scale from the element's "Value Scale". */
.gmg-v-icon { --gmg-v-size: 1em; }
.gmg-v-small { --gmg-v-size: .75rem; }
.gmg-v-large { --gmg-v-size: 1rem; }
.gmg-v.gmg-v-pill,
.gmg-v.gmg-v-outline,
.gmg-v.gmg-v-square,
.gmg-v.gmg-v-circle,
.gmg-v.gmg-v-label,
.gmg-v.gmg-v-icon { font-size: calc(var(--gmg-v-size, .875rem) * var(--gmg-v-scale, 1)); }
/* The theme sizes .uk-label in pixels: use em, so the label scales as a whole. */
.gmg-v.gmg-v-label { padding: .25em .7em; line-height: 1.3; }
.gmg-v-text.gmg-v-small { font-size: .875rem; }
.gmg-v-text.gmg-v-large { font-size: 1.125rem; }
.gmg-detail-text .gmg-v-text + .gmg-v-text::before { content: ", "; }

/* ------------------------------------------------------------------------
 * Features
 * --------------------------------------------------------------------- */
.gmg-features > li { display: flex; align-items: flex-start; gap: 10px; }
.gmg-features.gmg-features-columns > li { display: flex; }
.gmg-feature-icon { flex: none; line-height: 1; padding-top: .15em; }
.gmg-feature-icon .gmg-icon > svg { width: 18px; height: 18px; }
.gmg-feature-icon:not(.gmg-custom-color):not([class*="uk-text-"]) { color: var(--gmg-accent, var(--gmg-accent-default)); }
.gmg-features-small { font-size: .875rem; }
.gmg-features-large { font-size: 1.125rem; }

/* ------------------------------------------------------------------------
 * Links and buttons
 * --------------------------------------------------------------------- */
.gmg-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.gmg-links-full { flex-direction: column; align-items: stretch; }
.gmg-button-accent {
	background: var(--gmg-accent, var(--gmg-accent-default));
	color: #fff !important;
	border: 0;
}
.gmg-button-accent:hover,
.gmg-button-accent:focus { filter: brightness(1.08); color: #fff; }
.gmg-button-rounded { border-radius: 8px; }
.gmg-button-pill { border-radius: 999px; }
.gmg-button-square { border-radius: 0; }

/* ------------------------------------------------------------------------
 * Media
 * --------------------------------------------------------------------- */
.gmg-media img { display: block; max-width: 100%; height: auto; }
.gmg-media-icon { display: inline-block; line-height: 0; }

/* ------------------------------------------------------------------------
 * Panels
 * --------------------------------------------------------------------- */
.gmg-panel { position: relative; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.gmg-ghekko-soft { background: var(--gmg-soft); border-radius: 12px; }
.gmg-ghekko-outline { border: 1px solid var(--gmg-line); border-radius: 12px; }
.gmg-ghekko-accent { background: var(--gmg-soft); border-left: 4px solid var(--gmg-accent, var(--gmg-accent-default)); border-radius: 4px 12px 12px 4px; }

.gmg-radius-small { border-radius: 6px; overflow: hidden; }
.gmg-radius-medium { border-radius: 12px; overflow: hidden; }
.gmg-radius-large { border-radius: 24px; overflow: hidden; }

.gmg-item { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.gmg-hover-lift:hover,
.gmg-hover-lift-shadow:hover { transform: translateY(-4px); }
.gmg-hover-shadow:hover,
.gmg-hover-lift-shadow:hover { box-shadow: 0 14px 30px rgba(0, 0, 0, .12); }
.gmg-hover-accent { border: 1px solid transparent; }
.gmg-hover-accent:hover { border-color: var(--gmg-accent, var(--gmg-accent-default)); }
@media (prefers-reduced-motion: reduce) {
	.gmg-item, .gmg-panel, .gmg-v { transition: none; }
	.gmg-hover-lift:hover, .gmg-hover-lift-shadow:hover, a.gmg-v:hover { transform: none; }
}

/* ------------------------------------------------------------------------
 * Lines around items (product list)
 * --------------------------------------------------------------------- */
.gmg-lines { --gmg-line-space: 30px; }
.gmg-lines-space-small { --gmg-line-space: 15px; }
.gmg-lines-space-medium { --gmg-line-space: 40px; }
.gmg-lines-space-large { --gmg-line-space: 60px; }

.gmg-lines-top > * > .gmg-item,
.gmg-lines-both > * > .gmg-item { border-top: 1px solid var(--gmg-line); padding-top: var(--gmg-line-space); }
.gmg-lines-bottom > * > .gmg-item,
.gmg-lines-both > * > .gmg-item { border-bottom: 1px solid var(--gmg-line); padding-bottom: var(--gmg-line-space); }
.gmg-lines-between > .uk-grid-margin > .gmg-item { border-top: 1px solid var(--gmg-line); padding-top: var(--gmg-line-space); }
.gmg-lines > * > .gmg-item.uk-panel.gmg-has-highlight { padding-top: calc(var(--gmg-line-space) + 2rem); }
