/**
 * Kinkyo Custom Styles - Consolidated
 * All custom CSS for kinkyo.me theme in one file
 */

/* ===================================================================
   1. NAVIGATION & HEADER
   =================================================================== */

/* Hide "kinkyo.me" menu item in header navigation */
#menu-primary-items .page-item-18 {
	display: none;
}

/* Text overlay backgrounds for header content */
.custom-header-content .section-title,
.custom-header-content .entry-title,
.custom-header-content .entry-meta,
.custom-header-content .site-header-text {
	background: rgba(0, 0, 0, 0.1);
	padding: 4px 8px;
	border-radius: 4px;
	display: inline-block;
	backdrop-filter: blur(2px);
}

.custom-header-content .section-title-wrapper,
.custom-header-content .entry-header {
	display: inline-block;
}

/* Scroll down button - compact background */
.scroll-down {
	background: rgba(0, 0, 0, 0.1) !important;
	padding: 4px 8px !important;
	border-radius: 4px !important;
	backdrop-filter: blur(2px);
	display: inline-block !important;
}

/* Ensure Japanese text doesn't break mid-character */
.section-title,
.entry-title,
.entry-meta {
	word-break: keep-all;
	overflow-wrap: normal;
}

/* ===================================================================
   2. HOMEPAGE MAP LAYOUT
   =================================================================== */

/* Hide page title on homepage */
.home .page .entry-header {
	display: none;
}

/* Hide sidebar categories widget on homepage (replaced by map widget) */
.home #secondary #block-3 {
	display: none;
}

/* On homepage: align map top with sidebar widgets */
.home .entry-content {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

/* ===================================================================
   3. MAP CONTAINER & STYLES
   =================================================================== */

/* Map container - full width, viewport height */
.kinkyo-map-container {
	width: 100%;
	height: calc(100vh - 200px);
	min-height: 500px;
	margin: 0 0 20px 0;
}

.home .kinkyo-map-container {
	margin-top: 0;
	height: calc(100vh - 150px);
}

#kinkyo-map {
	width: 100%;
	height: 100%;
	border-radius: 6px;
	overflow: hidden;
}

/* ===================================================================
   4. MAP CATEGORIES WIDGET
   =================================================================== */

.kinkyo-map-categories-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.kinkyo-map-categories-widget li {
	margin: 0 0 8px 0;
	padding-left: 0;
}

.kinkyo-map-categories-widget label {
	display: flex;
	align-items: center;
	cursor: pointer;
	color: #ccc;
	font-size: 14px;
	line-height: 1.4;
	padding: 4px 0;
	transition: color 0.2s;
}

.kinkyo-map-categories-widget label:hover {
	color: #fff;
}

/* Hide default checkbox */
.kinkyo-map-categories-widget input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

/* Toggle Switch */
.kinkyo-map-categories-widget input[type="checkbox"] + .legend-color {
	position: relative;
	width: 36px;
	height: 18px;
	border-radius: 18px;
	margin: 0 10px 0 0;
	border: none;
	transition: background-color 0.3s ease;
	flex-shrink: 0;
}

.kinkyo-map-categories-widget input[type="checkbox"] + .legend-color::before {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.3s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.kinkyo-map-categories-widget input[type="checkbox"]:checked + .legend-color::before {
	transform: translateX(18px);
}

.kinkyo-map-categories-widget input[type="checkbox"]:checked + .legend-color {
	opacity: 1;
}

.kinkyo-map-categories-widget input[type="checkbox"]:not(:checked) + .legend-color {
	background: #555 !important;
	opacity: 0.5;
}

.kinkyo-map-categories-widget .legend-color {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	margin: 0 8px 0 0;
	border: 1px solid rgba(255, 255, 255, 0.3);
	flex-shrink: 0;
}

.kinkyo-map-categories-widget a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s;
}

.kinkyo-map-categories-widget a:hover {
	color: #fff;
	text-decoration: underline;
}

.kinkyo-map-categories-widget .legend-count {
	margin-left: 4px;
	color: #888;
	font-size: 12px;
}

/* ===================================================================
   5. MAP INFO WINDOW
   =================================================================== */

.kinkyo-info-window {
	padding: 0;
	margin: 0;
}

.kinkyo-info-window h4 {
	margin: 0 0 5px 0;
	padding: 0;
	font-size: 16px;
	line-height: 1.2;
}

.kinkyo-info-window h4 a {
	color: #4a9eff;
	text-decoration: none;
}

.kinkyo-info-window h4 a:hover {
	text-decoration: underline;
}

.kinkyo-info-window p {
	margin: 0;
	padding: 0;
	font-size: 13px;
	color: #666;
	line-height: 1.4;
}

/* Override Google Maps InfoWindow default padding */
.gm-style .gm-style-iw-c {
	padding: 12px !important;
}

.gm-style .gm-style-iw-d {
	overflow: hidden !important;
}

.gm-style-iw-tc {
	display: none;
}

/* ===================================================================
   6. SIDEBAR WIDGETS - GENERAL
   =================================================================== */

/* Remove base theme folder icons from all sidebar items */
.sidebar .widget li:before,
.sidebar .wp-block-group li:before {
	content: none !important;
	display: none !important;
	background-image: none !important;
}

.sidebar li,
.sidebar .recentcomments {
	padding-left: 0 !important;
}

/* General Widget Container Styling */
.widget-area .widget {
	margin-bottom: 10px;
	padding: 14px;
	background: #1a1a1a;
	border-radius: 6px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	transition: box-shadow 0.3s ease;
}

.widget-area .widget:hover {
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Widget Titles */
.widget-area .widget .widget-title,
.widget-area .widget h2 {
	margin: 0 0 12px 0 !important;
	padding: 0 0 8px 0 !important;
	font-size: 16px;
	border-bottom: 1px solid #333;
	color: #fff;
}

/* Widget Content Padding */
.widget-area .widget ul,
.widget-area .widget ol,
.widget-area .widget > div {
	padding: 0 2px;
}

.widget-area section {
	padding: 0 !important;
}

/* ===================================================================
   7. SEARCH WIDGET
   =================================================================== */

.widget-area .widget_search,
.widget-area .widget_block.widget_search {
	padding: 14px !important;
}

.widget-area .widget_search form,
.widget-area .widget_block.widget_search form {
	margin: 0 !important;
	padding: 0 !important;
}

.widget-area .widget_search .wp-block-search__label {
	display: none;
}

.widget-area .widget_search .wp-block-search__inside-wrapper {
	margin: 0 !important;
	padding: 0 !important;
}

.widget-area .widget_search input[type="search"] {
	padding: 8px 12px !important;
	border-radius: 4px;
	background: #2a2a2a;
	border: 1px solid #444;
	color: #fff;
	margin: 0 !important;
}

.widget-area .widget_search button {
	padding: 8px 12px !important;
	border-radius: 4px;
	margin: 0 !important;
}

/* ===================================================================
   8. CATEGORIES WIDGET
   =================================================================== */

.widget_categories ul,
.widget_block.widget_categories ul,
.wp-block-categories-list,
.wp-block-categories {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.widget_categories li,
.wp-block-categories-list li,
.wp-block-categories li,
.cat-item {
	margin-bottom: 6px !important;
	padding-left: 0 !important;
	background: none !important;
	background-image: none !important;
	list-style: none !important;
	list-style-type: none !important;
}

.widget_categories li::before,
.wp-block-categories-list li::before,
.wp-block-categories li::before,
.cat-item::before {
	content: none !important;
	display: none !important;
}

.widget_categories li svg,
.wp-block-categories-list li svg,
.wp-block-categories li svg {
	display: none !important;
}

.widget_categories a,
.wp-block-categories-list a,
.wp-block-categories a {
	color: #ccc;
	text-decoration: none;
	transition: color 0.2s;
	padding-left: 0 !important;
}

.widget_categories a:hover,
.wp-block-categories-list a:hover,
.wp-block-categories a:hover {
	color: #fff;
}

.widget_categories .counts,
.wp-block-categories-list .counts,
.wp-block-categories .counts {
	color: #888;
	font-size: 12px;
	margin-left: 4px;
}

/* ===================================================================
   9. TAGS WIDGET
   =================================================================== */

.widget_tag_cloud .widget-title,
.widget_tag_cloud h2 {
	margin-bottom: 12px !important;
	padding-bottom: 8px !important;
}

.widget_tag_cloud .tagcloud,
.widget_tag_cloud .wp-block-tag-cloud {
	margin-top: 4px;
}

/* ===================================================================
   10. RECENT POSTS / COMMENTS
   =================================================================== */

.widget_recent_entries ul,
.widget_recent_comments ul,
.widget_block ul {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}

.widget_recent_entries li,
.widget_recent_comments li,
.widget_block li {
	margin-bottom: 6px !important;
	padding: 0 !important;
	line-height: 1.5;
}

/* ===================================================================
   11. ARCHIVE / META WIDGETS
   =================================================================== */

.widget_archive ul,
.widget_meta ul {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}

.widget_archive li,
.widget_meta li {
	margin-bottom: 6px !important;
}

/* ===================================================================
   12. RESPONSIVE
   =================================================================== */

@media screen and (max-width: 768px) {
	.kinkyo-map-container {
		min-height: 400px;
	}
}
