/*
Theme Name: W.S.A. s.à r.l.
Description: Faithful WordPress copy of www.wsa.lu. Reuses the original site's compiled frontend stylesheet (assets/odoo/frontend.min.css); pages are built from core blocks and can be edited in the block editor.
Version: 2.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: wsa
*/

/* ---- Small additions on top of the original stylesheet ---- */

/* Cookie bar (the original is an Odoo JS popup; this is a plain fixed bar) */
#website_cookies_bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1055;
	box-shadow: 0 -0.25rem 1rem rgba(0, 0, 0, 0.15);
}
#website_cookies_bar[hidden] { display: none; }

/* Photo-wall lightbox */
.s_images_wall img, .wsa-photo-wall img { cursor: zoom-in; }
.wsa-lightbox .modal-content { background: transparent; border: 0; }
.wsa-lightbox img { max-height: 85vh; width: auto; max-width: 100%; margin: 0 auto; display: block; }

/* Form fields whose visibility depends on another answer are managed by wsa.js */
.s_website_form_field.wsa-hidden { display: none !important; }

/* Fallback layout for WordPress-generated pages (search results, 404) */
.wsa-generic { padding-top: 3rem; padding-bottom: 3rem; min-height: 50vh; }

/* Keep the WordPress admin bar from covering the mobile off-canvas menu */
.admin-bar .offcanvas { top: var(--wp-admin--admin-bar--height, 0); }

/* ==== Core blocks dressed as the original Odoo snippets ==================================== */
/* Shared by the front end and the editor canvas (inc/blocks.php loads this file in both). */

/* Layout: Odoo rows have no outer margin, Bootstrap gutters are 24px. */
.wp-block-columns { margin-bottom: 0; }
:where(.wp-block-columns.is-layout-flex) { gap: 1.5rem; }
.wp-block-group.container, .wp-block-group.o_container_small { margin-left: auto; margin-right: auto; }
.wp-block-columns.justify-content-between { justify-content: space-between; }
/* Odoo grid layouts that leave empty grid columns between items (job pages). */
@media (min-width: 782px) {
	.wp-block-columns.wsa-gap-cols-1 { gap: calc(8.333% + 1.5rem); }
	.wp-block-columns.wsa-gap-cols-2 { gap: calc(16.667% + 1.5rem); }
	.wp-block-columns.wsa-gap-cols-3 { gap: calc(25% + 1.5rem); }
}
.has-text-align-justify { text-align: justify; }

/* Images: plain, like the original img-fluid images. */
.wp-block-image { margin: 0; }
.wp-block-image img { max-width: 100%; height: auto; }
.wp-block-image.img-thumbnail { padding: 0; border: 0; border-radius: 0; background: none; }
.wp-block-image.img-thumbnail img { border: 1px solid #dee2e6; border-radius: 0.4rem; }
.wp-block-image.rounded img { border-radius: 0.4rem; }
.wp-block-image.rounded-circle img { border-radius: 50%; }
.wp-block-image.alignright { float: right; margin: 0 0 0 1rem; }
.wp-block-image.aligncenter { display: block; margin-left: auto; margin-right: auto; text-align: center; }
.wp-block-image.aligncenter img { display: inline-block; }
.s_features_grid .wp-block-image.s_features_grid_icon { margin: 0 15px 0 0; }

/* Separators: thin full-width rule (the "Wide line" style), optionally half width / 2px. */
.wp-block-separator { border: 0; border-top: 1px solid rgba(33, 37, 41, 0.15); color: #212529; background: none; opacity: 1; margin-left: auto; margin-right: auto; }
.wp-block-separator.wsa-hr-thick { border-top-width: 2px; }
.wp-block-separator.wsa-hr-half { width: 50%; }
.wp-block-separator.has-background { border-top-color: currentColor; }

/* Lists used as Bootstrap list groups keep their own spacing. */
.wp-block-list.list-group { padding-left: 0; margin-bottom: 0; }

/* Tables */
.wp-block-table { margin: 0 0 1rem; }
.wp-block-table.is-style-bordered table { border-collapse: collapse; width: 100%; }
.wp-block-table.is-style-bordered th, .wp-block-table.is-style-bordered td { border: 1px solid #dee2e6; padding: 0.5rem; vertical-align: top; }
.wp-block-table.is-style-bordered thead { border-bottom: 0; background: #f8f9fa; }
.wp-block-table.is-style-plain table { width: auto; border: 0; }
.wp-block-table.is-style-plain td, .wp-block-table.is-style-plain th { border: 0; padding: 0 1.5rem 1rem 0; vertical-align: top; }
.wp-block-table.is-style-plain td:first-child { white-space: nowrap; }

/* Paragraphs with an icon (block styles "Icon: …"); uses the site's Font Awesome font. */
p[class*="is-style-icon-"]::before {
	font-family: 'FontAwesome';
	font-weight: normal;
	display: inline-block;
	width: 1.28571429em;
	margin-right: 0.25rem;
	text-align: center;
}
.is-style-icon-location::before { content: "\f041"; }
.is-style-icon-department::before { content: "\f0e8"; }
.is-style-icon-employment::before { content: "\f0f2"; }
.is-style-icon-back::before { content: "\f177"; color: var(--o-color-1, #ed3037); margin-right: 0.5rem; }

/* Tabs (core Tabs block) styled like the original card with Bootstrap nav tabs. */
.wsa-tabs { border: 1px solid var(--o-border-color, rgba(0, 0, 0, 0.175)); border-radius: 0.4rem; background: rgba(255, 255, 255, 0.85); }
.wsa-tabs > .wp-block-tab-list { gap: 0; margin: 0; padding: 0.5rem 1rem 0; background: rgba(0, 0, 0, 0.03); border-bottom: 1px solid #dee2e6; border-radius: 0.4rem 0.4rem 0 0; }
.wsa-tabs > .wp-block-tab-list [role="tab"] {
	margin: 0 0 -1px;
	padding: 0.5rem 1rem;
	background: none;
	border: 1px solid transparent;
	border-radius: 0.4rem 0.4rem 0 0;
	color: var(--o-color-1, #ed3037);
	font: inherit;
	cursor: pointer;
}
.wsa-tabs > .wp-block-tab-list [role="tab"]:hover { border-color: #E9ECEF #E9ECEF #dee2e6; }
.wsa-tabs > .wp-block-tab-list [role="tab"][aria-selected="true"] { color: #495057; background: #FFFFFF; border-color: #dee2e6 #dee2e6 #FFFFFF; }
.wsa-tabs > .wp-block-tab-list [role="tab"][aria-selected="true"]::before { display: none; }
.wsa-tabs > .wp-block-tab-panels { padding: 1rem; border: 0; }

/* Contact page map */
.wsa-map { position: relative; height: 0; padding-bottom: 320px; }
.wsa-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Job list: the whole card links to the job. */
.wsa-job-card { position: relative; margin-bottom: 32px; }
/* Like Odoo's flex title row: a short title sits on the left, a long one wraps centred. */
.wsa-job-card h3 { display: flex; }
.wsa-job-card h3 a, .wsa-job-card h3 a:hover { color: inherit !important; text-decoration: none; }
.wsa-job-card p[class*="is-style-icon-"] { text-align: left; }
.wsa-job-card h3 a::after { content: ""; position: absolute; inset: 0; }
.wsa-job-card p { margin-bottom: 1rem; }
.wsa-job-card p.mb-0 { margin-bottom: 0; }

/* Job page "All Jobs" bar */
.wsa-backbar { padding: 0.5rem 0; }
.wsa-backbar p { margin: 0; }
.wsa-backbar a { text-decoration: none; }

/* Photo wall */
.wsa-photo-wall.wp-block-gallery.has-nested-images { --wp--style--unstable-gallery-gap: 24px; gap: 24px; }

/* PDF previews (File block) */
.wp-block-file { margin-bottom: 0; text-align: center; }
.wp-block-file .wp-block-file__embed { max-width: 1080px; margin: 0 auto 1rem; }
.wsa-photo-wall .wp-block-image.img-thumbnail img { border-color: #000; }
