/*
 Theme Name:   Blocksy Child - Design District
 Theme URI:    https://designdistrict.nl
 Description:  Custom child theme voor Design District website
 Author:       HappyFlow
 Author URI:   https://happyflow.io
 Template:     blocksy
 Version:      52
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  blocksy-child-designdistrict
*/

/* ========================================
   Deelnemers Cards - Design District Style
   ======================================== */

/* Card text section: 2-column grid layout */
[data-prefix="deelnemer_archive"] .entry-card.card-content {
	position: relative;
	display: grid;
	grid-template-rows: auto 1fr;
	grid-template-columns: 1fr auto;
}

/* Image spans full width */
[data-prefix="deelnemer_archive"] .entry-card .boundless-image {
	grid-column: 1 / -1;
	grid-row: 1;
}

/* Title in column 1 */
[data-prefix="deelnemer_archive"] .entry-card .entry-title {
	grid-column: 1;
	grid-row: 2;
	margin: 0;
	padding: 15px 20px 5px 20px;
	font-size: 18px;
	font-weight: 600;
}

/* Subtitel (meta) in column 1, below title */
[data-prefix="deelnemer_archive"] .entry-card .entry-meta[data-id="meta_2"] {
	grid-column: 1;
	grid-row: 3;
	margin: 0;
	padding: 0 20px 15px 20px;
	font-size: 14px;
}

/* Standnummer in column 2, spans rows 2-3, top aligned */
[data-prefix="deelnemer_archive"] .entry-card .ct-dynamic-data-layer[data-field*="standnummer"] {
	grid-column: 2;
	grid-row: 2 / 4;
	display: flex;
	align-items: flex-start;
	padding: 15px 30px 15px 20px;
	font-family: "Roboto Slab", serif;
	font-size: 20px;
	font-weight: 500;
}

/* Afgeknipte hoek rechtsonder via clip-path */
[data-prefix="deelnemer_archive"] .entry-card.card-content {
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%) !important;
}

/* Forceer overflow visible voor pseudo-element fallback */
[data-prefix="deelnemer_archive"] .entry-card.card-content {
	overflow: visible !important;
}

/* End Deelnemers Cards */

/* ========================================
   Foto Cards - Design District Style
   ======================================== */

/* Card base styling */
[data-prefix="foto_archive"] .entry-card.card-content {
	position: relative;
}

/* Title styling */
[data-prefix="foto_archive"] .entry-card .entry-title {
	margin: 0;
	padding: 15px 20px 5px 20px;
	font-size: 18px;
	font-weight: 600;
}

/* Datum (meta) styling */
[data-prefix="foto_archive"] .entry-card .entry-meta[data-id="meta_1"] {
	margin: 0;
	padding: 0 20px 15px 20px;
	font-size: 14px;
}

/* Afgeknipte hoek rechtsonder via clip-path */
[data-prefix="foto_archive"] .entry-card.card-content {
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%) !important;
	overflow: visible !important;
}

/* End Foto Cards */

/* ========================================
   Header Login/Logout Visibility
   ======================================== */

/* Hide "Inloggen" button when logged in */
.logged-in header .ct-button[data-id="button"] {
	display: none !important;
}

/* Hide "Uitloggen" menu item when logged out */
.logged-out .menu-item a[href*="action=logout"] {
	display: none !important;
}

/* Hide "Mijn account" menu when logged out (NL: 1378, EN: 1401) */
body:not(.logged-in) .menu-item-1378,
body:not(.logged-in) .menu-item-1401 {
	display: none !important;
}

/* End Header Login/Logout */

/* ========================================
   Fix: Dropdown menu above hero/carousel
   ======================================== */

/* Ensure header has high stacking context */
header[data-header],
.ct-header {
	position: relative;
	z-index: 99999 !important;
}

/* Dropdown menu high z-index */
header .sub-menu,
header .ct-menu-dropdown,
.ct-header .sub-menu {
	z-index: 999999 !important;
}

/* Lower Stackable carousel z-index */
.stk-block-carousel,
.wp-block-stackable-carousel {
	z-index: 1 !important;
}

/* End Dropdown z-index fix */

/* ========================================
   Deelnemer Edit Form - 2 Column Layout
   ======================================== */

/* Wrapper: 2-column grid on desktop (1/3 + 2/3) */
.deelnemer-edit-wrapper {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 40px;
	align-items: start;
	padding-bottom: 120px;
}

/* Mobile: single column */
@media (max-width: 991px) {
	.deelnemer-edit-wrapper {
		grid-template-columns: 1fr;
	}
	.deelnemer-edit-preview {
		display: none; /* Hide preview on mobile */
	}
}

/* Left column: Preview */
.deelnemer-edit-preview {
	position: sticky;
	top: 100px;
}

.deelnemer-edit-preview h3 {
	margin: 0 0 15px 0;
	font-size: 18px;
	color: #666;
}

/* Card preview - matches archive styling */
.deelnemer-card-preview {
	background: #fff;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
}

.deelnemer-card-preview .card-image {
	aspect-ratio: 4/3;
	overflow: hidden;
}

.deelnemer-card-preview .card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.deelnemer-card-preview .card-content {
	display: grid;
	grid-template-columns: 1fr auto;
	padding: 0;
	background: var(--theme-palette-color-1, #c85a38);
	color: #fff;
}

.deelnemer-card-preview .card-text {
	padding: 15px 20px;
}

.deelnemer-card-preview .card-title {
	margin: 0 0 5px 0;
	font-size: 18px;
	font-weight: 600;
	color: #fff;
}

.deelnemer-card-preview .card-subtitle {
	margin: 0;
	font-size: 14px;
	color: rgba(255,255,255,0.85);
}

.deelnemer-card-preview .card-standnummer {
	padding: 15px 30px 15px 20px;
	font-family: "Roboto Slab", serif;
	font-size: 20px;
	font-weight: 500;
	display: flex;
	align-items: flex-start;
	color: #fff;
}

.preview-note {
	margin: 15px 0 10px 0;
	font-size: 18px;
	color: #888;
	font-style: italic;
}

.preview-link {
	margin: 0;
}

.preview-link a {
	font-size: 14px;
	color: var(--theme-palette-color-1, #c85a38);
	text-decoration: none;
}

.preview-link a:hover {
	text-decoration: underline;
}

/* Right column: Form */
.deelnemer-edit-form h3 {
	margin: 0 0 20px 0;
	font-size: 24px;
}

.deelnemer-edit-form .form-readonly-info {
	margin: 0 0 10px 0;
	padding: 10px 15px;
	background: #f5f5f5;
	border-radius: 4px;
	font-size: 14px;
}

.deelnemer-edit-form .form-readonly-info:last-of-type {
	margin-bottom: 30px;
}

/* ACF form styling */
.deelnemer-edit-form .acf-form .acf-field {
	margin-bottom: 20px;
}

.deelnemer-edit-form .acf-form .acf-label {
	margin-bottom: 5px;
}

.deelnemer-edit-form .acf-form .acf-label label {
	font-weight: 600;
	font-size: 18px;
}

.deelnemer-edit-form .acf-form input[type="text"],
.deelnemer-edit-form .acf-form input[type="email"],
.deelnemer-edit-form .acf-form input[type="url"],
.deelnemer-edit-form .acf-form input[type="tel"],
.deelnemer-edit-form .acf-form textarea {
	width: 100%;
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 18px;
}

/* Hide globe icon on URL fields */
.deelnemer-edit-form .acf-form .acf-url .acf-icon,
.deelnemer-edit-form .acf-form .acf-url i {
	display: none !important;
}

.deelnemer-edit-form .acf-form .acf-url input[type="url"] {
	padding-left: 15px !important;
}

/* WYSIWYG editor minimum font size */
.deelnemer-edit-form .acf-form .acf-editor-wrap iframe,
.deelnemer-edit-form .acf-form .acf-editor-wrap .mce-content-body {
	font-size: 18px;
}

.deelnemer-edit-form .acf-form input:focus,
.deelnemer-edit-form .acf-form textarea:focus {
	border-color: var(--theme-palette-color-1, #c85a38);
	outline: none;
	box-shadow: 0 0 0 2px rgba(200, 90, 56, 0.1);
}

.deelnemer-edit-form .acf-form .acf-button {
	background: var(--theme-palette-color-1, #c85a38);
	color: #fff;
	border: none;
	padding: 12px 30px;
	font-size: 18px;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s;
}

.deelnemer-edit-form .acf-form .acf-button:hover {
	background: var(--theme-palette-color-2, #a84828);
}

/* Success message */
.deelnemer-edit-form .acf-form .updated {
	background: #d4edda;
	color: #155724;
	padding: 15px 20px;
	border-radius: 4px;
	margin-bottom: 20px;
}

/* Error messages */
.deelnemer-form-error {
	background: #f8d7da;
	color: #721c24;
	padding: 15px 20px;
	border-radius: 4px;
}

/* Featured Image Upload Field */
.deelnemer-edit-form .featured-image-field {
	margin-bottom: 30px;
	padding-bottom: 25px;
	border-bottom: 1px solid #eee;
}

.deelnemer-edit-form .featured-image-field .acf-label {
	margin-bottom: 10px;
}

.deelnemer-edit-form .featured-image-field .acf-label .description {
	margin: 5px 0 0 0;
	font-weight: normal;
	font-size: 13px;
	color: #666;
}

.deelnemer-edit-form .featured-image-upload {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: flex-start;
}

.deelnemer-edit-form .current-image-wrapper {
	flex: 0 0 auto;
}

.deelnemer-edit-form .current-featured-image {
	max-width: 200px;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* End Deelnemer Edit Form */

/* ========================================
   Language Tabs - NL/EN Profile Switching
   ======================================== */

.deelnemer-edit-tabs {
	display: flex;
	gap: 0;
	margin-bottom: 30px;
	border-bottom: 2px solid #eee;
}

.deelnemer-edit-tabs .tab-button {
	padding: 12px 24px;
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	font-size: 16px;
	font-weight: 500;
	color: #666;
	cursor: pointer;
	transition: all 0.2s;
}

.deelnemer-edit-tabs .tab-button:hover {
	color: var(--theme-palette-color-1, #c85a38);
}

.deelnemer-edit-tabs .tab-button.active {
	color: var(--theme-palette-color-1, #c85a38);
	border-bottom-color: var(--theme-palette-color-1, #c85a38);
}

.tab-content {
	display: none;
}

.tab-content.active {
	display: block;
}

/* EN Profile Activation */
.en-profile-activate {
	padding: 30px;
	background: #f8f9fa;
	border-radius: 8px;
	text-align: center;
}

.en-profile-activate h4 {
	margin: 0 0 15px 0;
	font-size: 20px;
}

.en-profile-activate p {
	margin: 0 0 15px 0;
	color: #666;
}

.en-profile-activate .field-description {
	font-size: 13px;
	color: #888;
	margin-bottom: 20px;
}

.en-profile-activate .button {
	padding: 12px 30px;
	font-size: 16px;
}

/* EN Profile Info */
.en-profile-info {
	margin: 0 0 25px 0;
	padding: 15px;
	background: #e8f4fc;
	border-radius: 4px;
	color: #1a5276;
	font-size: 14px;
}

/* EN Profielfoto Preview (read-only) */
.en-profielfoto-preview {
	margin-bottom: 30px;
	padding-bottom: 25px;
	border-bottom: 1px solid #eee;
}

.en-profielfoto-preview label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
}

.en-profielfoto-preview .field-description {
	font-size: 13px;
	color: #888;
	margin: 0 0 15px 0;
}

.en-profielfoto-preview .profielfoto-readonly {
	max-width: 200px;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Activation Message */
#en-activation-message {
	padding: 15px;
	border-radius: 4px;
}

#en-activation-message.success {
	background: #d4edda;
	color: #155724;
}

#en-activation-message.error {
	background: #f8d7da;
	color: #721c24;
}

/* End Language Tabs */

/* ========================================
   Character Counter - Beschrijving Field
   ======================================== */

.beschrijving-char-counter {
	margin-top: 8px;
	font-size: 13px;
	color: #666;
	text-align: right;
}

.beschrijving-char-counter .char-count {
	font-weight: 600;
}

.beschrijving-char-counter.near-limit {
	color: #856404;
}

.beschrijving-char-counter.near-limit .char-count {
	color: #856404;
}

.beschrijving-char-counter.over-limit {
	color: #721c24;
}

.beschrijving-char-counter.over-limit .char-count {
	color: #721c24;
	font-weight: 700;
}

/* End Character Counter */
