/* Map Container */
#lb-map-container {
    border: 1px solid var(--border-color, #ddd);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    /* Softer, modern shadow */
    z-index: 1;
    position: relative;
    margin-bottom: 20px;
    border-radius: 5px;
    /* Consistent radius */
    overflow: hidden;
    /* Capture corners */
}

/* Custom Marker */
.lb-custom-marker {
    background: none;
    border: none;
}

.lb-custom-marker svg {
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

/* Map Controls Wrapper */
.lb-map-controls-wrapper {
    display: flex;
    flex-wrap: wrap;
    /* Responsive wrapping */
    gap: 20px;
    align-items: flex-start;
    font-family: var(--font-family-base, sans-serif);
    color: var(--color, #444);
}

/* Visible Places List (Left Column) */
.lb-places-list {
    flex: 1;
    /* Takes remaining width */
    min-width: 250px;
    background: var(--paletteColor8, #ffffff);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-height: 400px;
    /* Prevent being too tall */
    overflow-y: auto;
    /* Scroll if needed */
}

.lb-places-list h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-family: var(--font-family-headings, inherit);
    font-weight: 600;
    font-size: 16px;
    color: var(--heading-color, #111);
    border-bottom: 2px solid var(--border-color, #eee);
    padding-bottom: 10px;
}

#lb-places-list-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

#lb-places-list-items li {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color, #eee);
}

#lb-places-list-items li:last-child {
    border-bottom: none;
}

#lb-places-list-items li a {
    text-decoration: none;
    color: var(--linkInitialColor, var(--paletteColor1, #3388ff));
    font-size: 15px;
    transition: color 0.2s ease;
}

#lb-places-list-items li a:hover {
    color: var(--linkHoverColor, var(--paletteColor2, #2563eb));
    text-decoration: none;
}

/* Legend (Right Column) */
.lb-map-legend-container {
    flex: 0 0 auto;
    /* Natural width */
    min-width: 220px;
    margin-bottom: 10px;
}

#lb-toggle-legend {
    margin-bottom: 10px;
    width: 100%;
    /* Full width button on clean aesthetic */
    background-color: var(--paletteColor1, #3388ff);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

#lb-toggle-legend:hover {
    background-color: var(--paletteColor2, #2563eb);
}

#lb-map-legend {
    background: var(--paletteColor8, #ffffff);
    padding: 15px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

#lb-map-legend h4 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--heading-color, #111);
}

#lb-map-legend ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lb-legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 14px;
    cursor: pointer;
    /* Clickable */
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    color: var(--color, #555);
}

/* Hover State */
.lb-legend-item:hover {
    background-color: var(--paletteColor6, #f0f0f1);
}

/* Active State */
.lb-legend-item.active {
    background-color: var(--paletteColor5, #e0e0e0);
    color: var(--heading-color, #000);
    font-weight: 600;
}

.lb-legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Single Place - Address Box */
.lb-map-address-box {
    margin-top: 20px;
    background: var(--paletteColor8, #ffffff);
    padding: 20px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.lb-address-text {
    flex: 1;
    font-size: 15px;
    color: var(--color, #555);
    min-width: 200px;
    line-height: 1.6;
}

.lb-address-text .dashicons {
    color: var(--paletteColor1, #3388ff);
    margin-right: 8px;
    vertical-align: middle;
}

.lb-directions-btn {
    background-color: var(--paletteColor1, #4CAF50) !important;
    color: #fff !important;
    border: none !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    transition: transform 0.2s, background-color 0.2s;
}

.lb-directions-btn:hover {
    background-color: var(--paletteColor2, #45a049) !important;
    transform: translateY(-2px);
    text-decoration: none !important;
}

.lb-directions-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Calendar Visibility */
#lb-calendar {
    background: var(--paletteColor8, #ffffff);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    /* Matches Blocksy card style often */
    min-height: 700px;
    /* Ensure sufficient height for month view */
    margin-bottom: 40px;
    border: 1px solid var(--border-color, #eaeaea);
}

/* Event List - Floating Cards */
.lb-events-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.lb-event-item {
    background: var(--paletteColor8, #ffffff);
    border-radius: 5px;
    padding: 30px;
    border: 1px solid var(--border-color, #f0f0f0);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lb-event-item:hover {
    transform: translateY(-4px);
    /* Lift effect */
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--paletteColor1, #3388ff);
    /* Highlight border color */
}

/* Accent Bar on Left */
.lb-event-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--paletteColor1, #3388ff);
}

.lb-event-item h3 {
    margin: 0 0 12px 0;
    font-size: 1.5em;
    font-family: var(--font-family-headings, inherit);
    color: var(--heading-color, #333);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.lb-event-item h3 small {
    font-size: 0.55em;
    color: var(--color, #777);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--paletteColor6, #f0f0f1);
    padding: 4px 10px;
    border-radius: 20px;
}

.lb-event-item p {
    margin: 8px 0;
    color: var(--color, #555);
    font-size: 1.05em;
    line-height: 1.6;
}

.lb-event-item a {
    color: var(--linkInitialColor, var(--paletteColor1, #3388ff));
    text-decoration: none;
    font-weight: 600;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size .3s;
}

.lb-event-item a:hover {
    text-decoration: none;
    background-size: 100% 2px;
    color: var(--linkHoverColor, var(--paletteColor2, #2563eb));
}

/* --- New Place Header Action Bar --- */
.lb-header-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
    align-items: center;
}

/* Base Action Button */
.lb-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    /* More standard height */
    min-width: 44px;
    padding: 0 18px;
    border-radius: 4px;
    /* Matches Blocksy default often */
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    font-family: var(--font-family-base, inherit);
    transition: all 0.25s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    background-color: var(--paletteColor6, #f5f5f5);
    /* Light grey buttons often */
    color: var(--heading-color, #333);
    border: 1px solid transparent;
}

.lb-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    color: var(--paletteColor1, #3388ff);
}

.lb-action-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
}

/* Text inside Main Buttons */
.lb-btn-text {
    margin-left: 8px;
}

/* Specific Button Colors */
.lb-website-btn {
    background-color: var(--heading-color, #333);
    /* Dark dark grey/black */
    color: #fff !important;
}

.lb-website-btn:hover {
    background-color: #000;
    color: #fff !important;
}

.lb-phone-btn {
    background-color: #4CAF50;
    color: #fff !important;
}

.lb-phone-btn:hover {
    background-color: #43a047;
    color: #fff !important;
}

/* Social Buttons */
.lb-facebook {
    background-color: #1877F2;
    color: #fff !important;
}

.lb-facebook:hover {
    background-color: #166fe5;
    color: #fff !important;
}

.lb-instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: #fff !important;
}

.lb-instagram:hover {
    opacity: 0.9;
    color: #fff !important;
}

.lb-google-maps {
    background-color: #DB4437;
    color: #fff !important;
}

.lb-google-maps:hover {
    color: #fff !important;
}

/* Icon-only buttons should be square */
.lb-action-btn:not(:has(.lb-btn-text)) {
    padding: 0;
    width: 44px;
}