/**
 * OceanWP footer polish + horizontal legal links.
 *
 * Legal strip works with either:
 *   - Core Navigation Menu widget (`.widget_nav_menu`)
 *   - OceanWP Custom Menu widget when the menu is `terms_el` / `terms_en`
 * Prefer Footer 3 alone for a full-width bottom bar.
 *
 * Font sizes use px (not rem/em): OceanWP root sizing makes fractional rem look tiny.
 * See agent-context/CONTEXT.md §5.6 CSS sizing note.
 */

/* --- Footer shell --- */
#footer.site-footer {
	--bess-footer-text: rgba(255, 255, 255, 0.82);
	--bess-footer-muted: rgba(255, 255, 255, 0.62);
	--bess-footer-link: rgba(255, 255, 255, 0.88);
	--bess-footer-link-hover: #ffffff;
	--bess-footer-gap: 28px;
}

#footer-widgets {
	padding-top: 40px;
	padding-bottom: 24px;
}

#footer-widgets .footer-widgets-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: var(--bess-footer-gap) 24px;
}

#footer-widgets .footer-box {
	margin-bottom: 0;
}

#footer-widgets .footer-widget {
	margin-bottom: 20px;
}

#footer-widgets .footer-widget:last-child {
	margin-bottom: 0;
}

/* Logo */
#footer-widgets .widget_media_image img {
	max-width: 200px;
	height: auto;
	opacity: 0.95;
}

/* Text / hours — match readable body size, not sub-rem */
#footer-widgets,
#footer-widgets p,
#footer-widgets .textwidget,
#footer-widgets .wp-block-paragraph {
	color: var(--bess-footer-text);
	font-size: 15px;
	line-height: 1.55;
}

#footer-widgets a {
	color: var(--bess-footer-link);
	text-decoration: none;
	transition: color 0.15s ease, opacity 0.15s ease;
}

#footer-widgets a:hover,
#footer-widgets a:focus {
	color: var(--bess-footer-link-hover);
	text-decoration: none;
}

#footer-widgets .wp-block-heading,
#footer-widgets .widget-title {
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.02em;
	margin: 0 0 12px;
	text-transform: none;
}

#footer-widgets .wp-block-paragraph strong u,
#footer-widgets .textwidget strong {
	color: #fff;
	text-decoration: none;
	font-weight: 600;
}

/* Soften Elementor chrome sometimes pasted into footer text widgets */
#footer-widgets .elementor-section,
#footer-widgets .elementor-container,
#footer-widgets .elementor-column,
#footer-widgets .elementor-widget-wrap {
	padding: 0 !important;
	margin: 0 !important;
}

/* --- Sitemap-style OceanWP custom menu (non-legal menus) --- */
#footer-widgets .custom-menu-widget .dropdown-menu {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

#footer-widgets .custom-menu-widget .dropdown-menu > li > a {
	color: var(--bess-footer-link);
	font-size: 15px;
	padding: 2px 0;
}

#footer-widgets .custom-menu-widget .nav-arrow {
	display: none;
}

#footer-widgets .custom-menu-widget .sub-menu {
	display: none; /* keep footer compact; top-level only */
}

/*
 * Legal strip shared selectors:
 *   - Core Navigation Menu: .widget_nav_menu ul.menu
 *   - OceanWP Custom Menu for synced terms menus: #menu-terms_el / #menu-terms_en
 */
#footer-widgets .widget_nav_menu .widget-title {
	display: none;
}

#footer-widgets .widget_nav_menu ul.menu,
#footer-widgets .custom-menu-widget #menu-terms_el.dropdown-menu,
#footer-widgets .custom-menu-widget #menu-terms_en.dropdown-menu {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-items: center;
	gap: 8px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

#footer-widgets .widget_nav_menu ul.menu > li,
#footer-widgets .custom-menu-widget #menu-terms_el.dropdown-menu > li,
#footer-widgets .custom-menu-widget #menu-terms_en.dropdown-menu > li {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
	float: none;
	width: auto;
	/* OceanWP: .site-footer .widget_nav_menu li { border-bottom + first-child border-top } */
	border: 0 !important;
	border-top: 0 !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
}

#footer-widgets .widget_nav_menu ul.menu > li > a,
#footer-widgets .custom-menu-widget #menu-terms_el.dropdown-menu > li > a,
#footer-widgets .custom-menu-widget #menu-terms_en.dropdown-menu > li > a {
	color: var(--bess-footer-muted);
	font-size: 14px;
	letter-spacing: 0.01em;
	line-height: 1.4;
	padding: 0;
	white-space: nowrap;
	text-decoration: none !important;
	border: 0 !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
	background: none !important;
	background-image: none !important;
}

#footer-widgets .widget_nav_menu ul.menu > li > a:hover,
#footer-widgets .widget_nav_menu ul.menu > li > a:focus,
#footer-widgets .widget_nav_menu ul.menu > li.current-menu-item > a,
#footer-widgets .custom-menu-widget #menu-terms_el.dropdown-menu > li > a:hover,
#footer-widgets .custom-menu-widget #menu-terms_el.dropdown-menu > li > a:focus,
#footer-widgets .custom-menu-widget #menu-terms_el.dropdown-menu > li.current-menu-item > a,
#footer-widgets .custom-menu-widget #menu-terms_en.dropdown-menu > li > a:hover,
#footer-widgets .custom-menu-widget #menu-terms_en.dropdown-menu > li > a:focus,
#footer-widgets .custom-menu-widget #menu-terms_en.dropdown-menu > li.current-menu-item > a {
	color: var(--bess-footer-link-hover);
	text-decoration: none !important;
	border-bottom: 0 !important;
}

#footer-widgets .widget_nav_menu .sub-menu,
#footer-widgets .custom-menu-widget #menu-terms_el .sub-menu,
#footer-widgets .custom-menu-widget #menu-terms_en .sub-menu {
	display: none;
}

/*
 * Full-width legal bar at the bottom of the widgets row when Footer 3
 * holds the legal menu alone (Navigation Menu or OceanWP Custom Menu for terms_*).
 */
#footer-widgets .footer-box.col-3:has(> .widget_nav_menu):not(:has(.custom-menu-widget)),
#footer-widgets .footer-box.col-3:has(> .custom-menu-widget #menu-terms_el):not(:has(.widget_nav_menu)),
#footer-widgets .footer-box.col-3:has(> .custom-menu-widget #menu-terms_en):not(:has(.widget_nav_menu)) {
	flex: 0 0 100%;
	max-width: 100%;
	width: 100%;
	order: 99;
	padding-top: 12px;
	margin-top: 0;
	border-top: 0 !important;
}

#footer-widgets .footer-box.col-3:has(> .widget_nav_menu):not(:has(.custom-menu-widget)) .widget_nav_menu ul.menu,
#footer-widgets .footer-box.col-3:has(> .custom-menu-widget #menu-terms_el) #menu-terms_el.dropdown-menu,
#footer-widgets .footer-box.col-3:has(> .custom-menu-widget #menu-terms_en) #menu-terms_en.dropdown-menu {
	justify-content: center;
}

/* Legal menu still inside another column (e.g. under hours) */
#footer-widgets .footer-box:not(.col-3) > .widget_nav_menu,
#footer-widgets .widget_nav_menu,
#footer-widgets .footer-box:not(.col-3) > .custom-menu-widget:has(#menu-terms_el),
#footer-widgets .footer-box:not(.col-3) > .custom-menu-widget:has(#menu-terms_en),
#footer-widgets .custom-menu-widget:has(#menu-terms_el),
#footer-widgets .custom-menu-widget:has(#menu-terms_en) {
	margin-top: 16px;
	padding-top: 0;
	border-top: 0 !important;
	box-shadow: none !important;
}

#footer-widgets .widget_nav_menu::before,
#footer-widgets .widget_nav_menu::after,
#footer-widgets .custom-menu-widget:has(#menu-terms_el)::before,
#footer-widgets .custom-menu-widget:has(#menu-terms_el)::after,
#footer-widgets .custom-menu-widget:has(#menu-terms_en)::before,
#footer-widgets .custom-menu-widget:has(#menu-terms_en)::after {
	content: none !important;
	display: none !important;
	border: 0 !important;
}

/* --- Copyright / footer bottom --- */
#footer-bottom {
	border-top: 0 !important;
	padding-top: 16px;
	padding-bottom: 16px;
}

#footer-bottom #copyright,
#footer-bottom #copyright a {
	color: var(--bess-footer-muted);
	font-size: 13px;
	text-align: center;
}

/* --- Responsive --- */
@media (max-width: 959px) {
	#footer-widgets .footer-widgets-inner {
		gap: 24px;
	}

	#footer-widgets .widget_nav_menu ul.menu,
	#footer-widgets .custom-menu-widget #menu-terms_el.dropdown-menu,
	#footer-widgets .custom-menu-widget #menu-terms_en.dropdown-menu {
		justify-content: flex-start;
	}

	#footer-widgets .widget_nav_menu ul.menu > li > a,
	#footer-widgets .custom-menu-widget #menu-terms_el.dropdown-menu > li > a,
	#footer-widgets .custom-menu-widget #menu-terms_en.dropdown-menu > li > a {
		white-space: normal;
	}
}

@media (max-width: 767px) {
	#footer-widgets {
		padding-top: 32px;
	}

	#footer-widgets .widget_nav_menu ul.menu,
	#footer-widgets .custom-menu-widget #menu-terms_el.dropdown-menu,
	#footer-widgets .custom-menu-widget #menu-terms_en.dropdown-menu {
		justify-content: center;
		row-gap: 8px;
	}

	#footer-widgets .footer-box:not(.col-3) > .widget_nav_menu ul.menu,
	#footer-widgets .footer-box:not(.col-3) > .custom-menu-widget #menu-terms_el.dropdown-menu,
	#footer-widgets .footer-box:not(.col-3) > .custom-menu-widget #menu-terms_en.dropdown-menu {
		justify-content: flex-start;
	}
}
