/**
 * Habillage RestroPress aux couleurs de la charte (charge apres les CSS du plugin).
 */

/* La carte a besoin de la largeur "large" (menu + panier cote a cote) */
.wp-block-post-content > .restropress,
.wp-block-post-content > .rpress-checkout-v2,
.wp-block-post-content > #rpress_checkout_wrap {
	max-width: var(--wp--style--global--wide-size) !important;
}
#rpress_checkout_wrap.rpress-checkout-v2 {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
}

/* Police unique de la charte, sans majuscules forcees ni gras (non supporte) */
.restropress,
#rpressModal,
#rpressDateTime,
#rpress_checkout_wrap {
	font-family: var(--wp--preset--font-family--schuboise);
	--rpress-theme-primary: var(--wp--preset--color--miam);
}
.restropress :is(h1, h2, h3, h4, h5, h6, p, a, span, label, li, button, input, select, textarea, strong, b):not([class*="icon"]),
#rpressModal :is(h1, h2, h3, h4, h5, h6, p, a, span, label, li, button, input, select, textarea, strong, b):not([class*="icon"]),
#rpressDateTime :is(h1, h2, h3, h4, h5, h6, p, a, span, label, li, button, input, select, textarea):not([class*="icon"]),
#rpress_checkout_wrap :is(h1, h2, h3, h4, h5, h6, p, a, span, label, li, button, input, select, textarea, legend, strong, b):not([class*="icon"]) {
	font-family: var(--wp--preset--font-family--schuboise) !important;
	text-transform: none !important;
	font-weight: 400 !important;
}

/* Tailles un peu plus genereuses : la police manuscrite est petite */
.restropress .rpress_fooditem_title,
.restropress .rpress-category-title,
.restropress h3 {
	font-size: 1.25rem !important;
}
.restropress .rpress-cat-name,
.restropress .rpress-category-heading,
.restropress h2 {
	font-size: 1.8rem !important;
	color: var(--wp--preset--color--miam) !important;
}
.restropress p,
.restropress .rpress-fooditem-text,
.restropress .rpress_fooditem_excerpt {
	font-size: 1rem !important;
	color: var(--wp--preset--color--noir) !important;
}

/* Boutons principaux (commander, valider) aux couleurs de Miam */
.restropress .button,
.restropress button[type="submit"],
#rpressModal .button,
#rpressModal button[type="submit"],
#rpress_checkout_wrap .button,
#rpress_checkout_wrap button[type="submit"],
#rpress_checkout_wrap input[type="submit"] {
	background-color: var(--wp--preset--color--miam) !important;
	border-color: var(--wp--preset--color--miam) !important;
	color: var(--wp--preset--color--blanc) !important;
	border-radius: var(--wp--custom--radius--pill) !important;
}

/* Petits boutons du panier (modifier / retirer) : discrets */
.restropress .rpress-edit-from-cart,
.restropress .rpress-remove-from-cart {
	background: transparent !important;
	border: 0 !important;
	color: var(--wp--preset--color--noir) !important;
	width: auto !important;
	min-width: 0 !important;
	padding: 0.2rem 0.4rem !important;
}

/* Cartes des plats et panier : arrondis de la charte */
.restropress .rpress_fooditem_inner,
.restropress .rpressStickySidebar > *,
#rpress_checkout_wrap .rpress-checkout-card {
	border-radius: var(--wp--custom--radius--card) !important;
}

/* Reçu / suivi de commande et autres écrans RestroPress (classes rp-*) */
.wp-block-post-content :is([class^="rp-"], [class*=" rp-"], [class^="rpress"], [class*=" rpress"]) :is(h1, h2, h3, h4, h5, h6, p, span, div, a, strong, small, li, td, th, label, button):not([class*="icon"]),
.wp-block-post-content :is([class^="rp-"], [class*=" rp-"], [class^="rpress"], [class*=" rpress"]):is(h1, h2, h3, h4, h5, h6, p, span, div, a, strong, small, li, td, th, label, button):not([class*="icon"]) {
	font-family: var(--wp--preset--font-family--schuboise) !important;
}

/* Notifications (rp-tata) : icones Material remplacees par des symboles de la police */
.tata .material-icons {
	font-size: 0 !important;
	font-family: var(--wp--preset--font-family--schuboise) !important;
}
.tata .material-icons::before {
	font-size: 1.4rem;
	content: "✓";
}
.tata.error .material-icons::before,
.tata.warn .material-icons::before { content: "!"; }
.tata .tata-close.material-icons::before { content: "✕"; font-size: 1rem; }
.tata :is(.tata-title, .tata-text) {
	font-family: var(--wp--preset--font-family--schuboise) !important;
}
