/*
Theme Name: HanaCon.de
Author: HanaCon e.V.
Description: Divi Child Theme für die HanaCon
Version: 1.4.1
Template: Divi

This is the child theme for Divi theme, generated with Generate Child Theme plugin by catchthemes.

(optional values you can add: Theme URI, Author URI, License, License URI, Tags, Text Domain)
*/

.hc-app {
    font-family: 'Saira', sans-serif;
    padding: clamp(10px, 2vw, 20px);
    box-sizing: border-box;
    height: 100%;
}

.hc-app .main-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: clamp(14px, 2vw, 30px);
    width: 100%;
    height: 100%;
    align-items: stretch;
}

.hc-app .map-section,
.hc-app .legend-section {
    background-color: #ea559d;
    border: 2px solid #9a4088;
    border-radius: 12px;
    height: 100%;
    min-height: 0;
}

.hc-app .map-section {
    position: relative;
    min-width: 0;
    padding: clamp(6px, 1.2vw, 10px);
    box-sizing: border-box;
}

.hc-app .map-viewport {
    width: 100%;
    height: 100%;
    overflow: auto;
    box-sizing: border-box;
    touch-action: none;
}

.hc-app .map-viewport.is-draggable {
    cursor: grab;
}

.hc-app .map-viewport.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.hc-app .map-viewport.is-dragging .map-image {
    pointer-events: none;
}

.hc-app .map-image {
    -webkit-user-drag: none;
    user-select: none;
}

.hc-app .fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 50;
    background: rgba(24, 15, 42, 0.75);
    border: 1.5px solid #9a4088;
    border-radius: 6px;
    color: #fba8d2;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.hc-app .fullscreen-btn:hover {
    background: #b85bff;
    border-color: #b85bff;
    color: #ffffff;
}

.hc-app .map-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: rgba(24, 15, 42, 0.75);
    border: 1.5px solid #9a4088;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.hc-app .zoom-btn,
.hc-app .zoom-label {
    min-width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1.5px solid #9a4088;
    font: inherit;
    font-weight: 700;
}

.hc-app .zoom-btn {
    background: #180f2a;
    color: #fba8d2;
    cursor: pointer;
    padding: 0 10px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.hc-app .zoom-btn:hover {
    background: #b85bff;
    border-color: #b85bff;
    color: #ffffff;
}

.hc-app .zoom-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 0 8px;
    box-sizing: border-box;
}

.hc-app .map-image-wrapper {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

.hc-app .map-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.hc-app .legend-section {
    --legend-pad: clamp(12px, 2vw, 20px);
    min-width: 0;
    position: relative;
    padding: var(--legend-pad);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    box-sizing: border-box;
}

.hc-app .legend-section::-webkit-scrollbar { width: 8px; }
.hc-app .legend-section::-webkit-scrollbar-track { background: #ea559d; border-radius: 4px; }
.hc-app .legend-section::-webkit-scrollbar-thumb { background: #180f2a; border-radius: 4px; }
.hc-app .legend-section::-webkit-scrollbar-thumb:hover { background: #b85bff; }

.hc-app h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #ffffff;
    border-bottom: 2px solid #180f2a;
    padding-bottom: 10px;
    font-size: clamp(1.1rem, 1.4vw, 1.5rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.hc-app .legend-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
    border-bottom: none;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.hc-app .legend-header::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 25%;
    height: 2px;
    background: #ffd6ea;
    border-radius: 2px;
    transform: translateX(-50%);
}

.hc-app .legend-header h2 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.hc-app .legend-sticky {
    position: sticky;
    top: calc(var(--legend-pad) * -1);
    z-index: 20;
    background: #ea559d;
    margin: calc(var(--legend-pad) * -1) calc(var(--legend-pad) * -1) 4px;
    padding: var(--legend-pad) var(--legend-pad) 8px;
    white-space: nowrap;
    overflow: hidden;
}

.hc-app .legend-tools {
    margin: 0;
}

.hc-app .legend-search {
    width: 100%;
    border: 2px solid #9a4088;
    border-radius: 8px;
    background: #ffffff;
    color: #180f2a;
    font-family: inherit;
    font-size: 15px;
    padding: 10px 12px;
    outline: none;
    box-sizing: border-box;
}

.hc-app .legend-search::placeholder {
    color: #6f5a83;
    opacity: 0.85;
}

.hc-app .legend-search:focus {
    border-color: #b85bff;
}

.hc-app .legend-empty {
    margin: 8px 0 2px;
    color: #180f2a;
    font-weight: 700;
    font-size: 14px;
}

.hc-app .booth {
    position: absolute;
    background-color: transparent;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.hc-app .booth.legend-hotspot {
    border-radius: 4px;
}

.hc-app .booth.active {
    background-color: rgba(184, 91, 255, 0.42);
    border-color: #180f2a;
    box-shadow: 0 0 12px rgba(24, 15, 42, 0.55);
}

.hc-app .booth.filter-match {
    background-color: rgba(184, 91, 255, 0.35);
    border-color: #180f2a;
    box-shadow: 0 0 10px rgba(24, 15, 42, 0.4);
}

.hc-app .booth.is-link {
    cursor: pointer;
}

.hc-app .tooltip {
    position: absolute;
    display: none;
    background: rgba(24, 15, 42, 0.95);
    border: 1px solid #b85bff;
    color: #fba8d2;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 15px;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.hc-app #hcSelectedTooltip {
    z-index: 1001;
}

.hc-app .tooltip strong {
    color: #b85bff;
    font-size: 16px;
}

.hc-app .legend-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.hc-app .legend-item[hidden] {
    display: none !important;
}

.hc-app .legend-item {
    padding: 12px 12px;
    border-bottom: 1px solid rgba(24, 15, 42, 0.2);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: clamp(14px, 1.2vw, 16px);
    line-height: 1.35;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hc-app .booth-id {
    display: inline-block;
    width: 38px;
    font-weight: 700;
    color: #ffffff;
    transition: color 0.2s;
}

.hc-app .legend-link-icon {
    font-size: 14px;
    color: #ffd6ea;
}

.hc-app .legend-item:hover,
.hc-app .legend-item.highlight {
    background-color: #180f2a;
    color: #fba8d2;
    border-left: 4px solid #b85bff;
    padding-left: 8px;
    border-bottom-color: transparent;
}

.hc-app .legend-item.highlight .booth-id {
    color: #b85bff;
}

.hc-app .legend-item.filter-match {
    background-color: #180f2a;
    color: #fba8d2;
    border-left: 4px solid #b85bff;
    padding-left: 8px;
    border-bottom-color: transparent;
}

.hc-app .legend-item.filter-match .booth-id {
    color: #b85bff;
}

#hcAppWrapper:fullscreen {
    background: #180f2a;
    box-sizing: border-box;
    padding: clamp(8px, 1vw, 14px);
    height: 100%;
}

#hcAppWrapper:fullscreen .main-layout {
    margin: 0;
    height: 100%;
}

#hcAppWrapper:fullscreen .map-section,
#hcAppWrapper:fullscreen .legend-section {
    overflow: auto;
}

@media (orientation: landscape) and (max-height: 600px) {
    .hc-app .main-layout {
        grid-template-columns: minmax(0, 3fr) minmax(180px, 1fr);
        gap: 8px;
    }

    .hc-app .legend-section {
        --legend-pad: 8px;
    }

    .hc-app .legend-item {
        padding: 7px 8px;
        font-size: 12px;
    }

    .hc-app .legend-item:hover,
    .hc-app .legend-item.highlight {
        padding-left: 5px;
    }

    .hc-app .booth-id {
        width: 30px;
    }

    .hc-app h2 {
        font-size: 0.9rem;
    }

    .hc-app .legend-search {
        padding: 6px 8px;
        font-size: 13px;
    }
}

@media (orientation: portrait) and (max-width: 1024px) {
    .hc-app .main-layout {
        grid-template-columns: 1fr;
        height: auto !important;
        align-items: start;
    }

    .hc-app .map-section {
        align-self: auto;
        height: auto !important;
        max-height: none !important;
    }

    .hc-app .map-viewport {
        height: auto !important;
        max-height: 55vw !important;
    }

    .hc-app .legend-section {
        height: min(50vh, 420px) !important;
        max-height: min(50vh, 420px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

@media (orientation: portrait) and (max-width: 640px) {
    .hc-app {
        padding: 10px;
    }

    .hc-app .main-layout {
        gap: 10px;
    }

    .hc-app .map-section,
    .hc-app .legend-section {
        border-radius: 10px;
    }

    .hc-app .legend-item {
        padding: 13px 10px;
    }

    .hc-app .legend-item:hover,
    .hc-app .legend-item.highlight {
        padding-left: 6px;
    }
}

:root {
    --hana-pink: #ffb7c5;
    --hana-petal-bg: rgba(253, 170, 184, 0.884);
    --hana-petal-bg2: rgb(180, 62, 155);
    --hana-cherry-blossom-pink: #FF99CC;
    --hana-cherry-blossom-pink-light: #FFC2E0;
    --hana-vibrant-purple: #B85BFF;
}

body {
    background: radial-gradient(var(--hana-petal-bg2) 0%, var(--hana-petal-bg) 100%) !important;
}

#hcPageHeader { transition: background-color 0.4s ease-in-out !important; }
#hcPageHeader.hcSolidHeader { background-color: #fba8d2 !important; }

span.highlight {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

span.highlight.cherry-blossom {
    color: var(--hana-cherry-blossom-pink); 
}

span.highlight.cherry-blossom-light {
    color: var(--hana-cherry-blossom-pink-light);
}

span.highlight.vibrant-purple {
    color: var(--hana-vibrant-purple);
}

span.highlight.transform {
    display: inline-block;
    margin-inline: 0.08em;
    transition: transform 0.2s ease;
    transform-origin: center;
}

span.highlight.transform:hover {
    transform: scale(1.05);
}

/* --- Base Styles (Desktop & General) --- */
.pretix-widget {
	background-color: #180f2a !important; 
	color: #fba8d2 !important;           
	border: 1px solid #333 !important;
	font-size: 15px;
	padding: 20px;
	border-radius: 8px;
	/* Ensures the widget doesn't break layout on tiny screens */
	box-sizing: border-box; 
	width: 100%;
}

/* Clearer item rows */
.pretix-widget-item-row {
	border-bottom: 1px solid #333 !important;
	display: flex;
	flex-wrap: wrap; /* Allows price/count to wrap on very small screens */
	padding: 10px 0;
}

.pretix-widget-item-price, 
.pretix-widget-item-description {
	color: #fba8d2 !important;
	font-size: 15px;
}

/* --- Mobile Specific Enhancements --- */
@media (max-width: 600px) {
	.pretix-widget {
		padding: 10px; /* Reduce padding to save screen real estate */
		font-size: 14px; /* Slightly smaller text for mobile density */
	}

	/* Make the ticket name stand out more on mobile */
	.pretix-widget-item-title {
		font-weight: bold;
		display: block;
		width: 100%;
		margin-bottom: 5px;
	}

	/* Adjust inputs and buttons for fat-finger friendliness */
	.pretix-widget input, 
	.pretix-widget button {
		min-height: 44px; /* Standard touch target size */
		margin-top: 5px;
	}

	/* Price and Description adjustments */
	.pretix-widget-item-price, 
	.pretix-widget-item-description {
		font-size: 13px;
	}
}
