/* Forró Directory Frontend Styles */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    /* Accent */
    --forro-primary-accent: #495057;
    --forro-primary-accent-hover: #343a40;
    --forro-focus-ring: #212529;

    /* Text */
    --forro-text-primary: #333;
    --forro-text-dark: #444;
    --forro-text-secondary: #666;
    --forro-text-excerpt: #555;
    --forro-text-soft: #777;
    --forro-text-muted: #999;

    /* Backgrounds */
    --forro-bg-white: #fff;
    --forro-bg-light: #f8f9fa;

    /* Borders */
    --forro-border: #ddd;
    --forro-border-light: #eee;

    /* Status */
    --forro-info: #17a2b8;
    --forro-success: #28a745;
    --forro-danger-bg: #f8d7da;
    --forro-danger-text: #721c24;
    --forro-past: #6c757d;

    /* Brand */
    --forro-brand-green: #2B9264;
    --forro-brand-green-dark: #1a6b45;
}

/* ==========================================================================
   Grid Layouts
   ========================================================================== */

.forro-creators-grid,
.forro-events-grid {
    margin: 2rem 0;
}

.creators-list,
.events-list,
.projects-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.creator-card,
.event-card {
    background: var(--forro-bg-white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.creator-card:hover,
.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.creator-card-inner,
.event-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Creator Cards
   ========================================================================== */

.creator-photo,
.event-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.creator-thumbnail,
.event-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creator-info,
.event-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.creator-name,
.event-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    line-height: 1.3;
}

.creator-name a,
.event-title a {
    color: var(--forro-text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.creator-name a:hover,
.event-title a:hover {
    color: var(--forro-primary-accent);
}

.creator-roles,
.event-types {
    margin: 0.5rem 0;
}

.event-styles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.event-price {
    font-weight: 600;
    color: var(--forro-text-primary, #333);
    margin: 0.25rem 0;
}

.role-badge,
.event-type-badge,
.style-badge {
    display: inline-block;
    background: var(--forro-primary-accent);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin: 0.2rem 0.3rem 0.2rem 0;
}

/* Clickable badge links (#992) */
a.role-badge,
a.event-type-badge,
a.style-badge {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
}

a.role-badge:hover,
a.event-type-badge:hover,
a.style-badge:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.online-badge {
    display: inline-block;
    background: var(--forro-info);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin: 0.2rem 0.3rem 0.2rem 0;
}

.creator-location,
.event-location,
.event-venue,
.event-date,
.event-schedule {
    margin: 0.5rem 0;
    color: var(--forro-text-secondary);
    font-size: 0.9rem;
}

.creator-excerpt,
.event-excerpt {
    margin: 1rem 0;
    color: var(--forro-text-excerpt);
    font-size: 0.9rem;
    flex: 1;
}

.view-profile,
.view-event {
    display: inline-block;
    background: var(--forro-primary-accent);
    color: white;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
    text-align: center;
    margin-top: auto;
}

.view-profile:hover,
.view-profile:focus,
.view-event:hover,
.view-event:focus {
    background: var(--forro-primary-accent-hover);
    outline: 2px solid var(--forro-primary-accent);
    outline-offset: 2px;
}

/* ==========================================================================
   Filters
   ========================================================================== */

.forro-filters-container {
    background: var(--forro-bg-light);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.forro-filters-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--forro-text-primary);
    margin: 0 0 1rem 0;
    padding: 0;
}

.forro-filters .filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    margin-top: 0;
    color: var(--forro-text-primary);
    flex-shrink: 0;
    line-height: 1.2; /* #1068: Consistent label height for checkbox alignment */
}

.filter-group select,
.filter-group input[type="text"],
.filter-group input[type="date"] {
    padding: 0.6rem;
    border: 1px solid var(--forro-border);
    border-radius: 4px;
    font-size: 0.9rem;
    height: 40px;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* #1068: Override Enfold's #top select { margin-bottom:20px } — needs ID-level specificity */
#top .filter-group select,
#top .filter-group input[type="text"],
#top .filter-group input[type="date"] {
    margin-bottom: 0;
}

/* Inline checkbox styling (#469, #1068) */
.filter-group .checkbox-label--inline {
    margin-top: 0.5rem;
}

/* #1068: Override Enfold's #top label { font-weight:700; margin-bottom } — needs ID-level specificity */
#top .filter-group .checkbox-label--inline {
    font-weight: 400;
    margin-bottom: 0;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Actions row spans full width below filter dropdowns (Issue #331) */
.filter-row-actions {
    grid-column: 1 / -1;
    margin-top: 1rem;
    border-top: 1px solid var(--forro-border);
    padding-top: 1rem;
}

.filter-row-actions .filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-row-actions .checkbox-label {
    display: inline-flex;
    white-space: nowrap;
}

.btn-primary,
.btn-secondary {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.btn-primary {
    background: var(--forro-primary-accent);
    color: white;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--forro-primary-accent-hover);
    outline: 2px solid var(--forro-primary-accent);
    outline-offset: 2px;
}

/* Green search button styling - overrides default primary accent */
#apply-filters.btn-primary,
#apply-filters-creators.btn-primary,
#apply-filters-events.btn-primary {
    --fd-search-bg: var(--forro-brand-green);
    --fd-search-bg-hover: #247752;

    background: var(--fd-search-bg);
}

#apply-filters.btn-primary:hover,
#apply-filters.btn-primary:focus,
#apply-filters-creators.btn-primary:hover,
#apply-filters-creators.btn-primary:focus,
#apply-filters-events.btn-primary:hover,
#apply-filters-events.btn-primary:focus {
    background: var(--fd-search-bg-hover);
    outline-color: var(--fd-search-bg);
}

/* #1088: Deferred filter apply — disabled and pending button states */
#apply-filters.btn-primary:disabled,
#apply-filters-creators.btn-primary:disabled,
#apply-filters-events.btn-primary:disabled {
    opacity: 0.5;
    cursor: default;
}

#apply-filters.btn-primary.filters-pending,
#apply-filters-creators.btn-primary.filters-pending,
#apply-filters-events.btn-primary.filters-pending,
#apply-filters-projects.btn-primary.filters-pending {
    animation: subtle-pulse 1.5s ease-in-out 1;
}

@keyframes subtle-pulse {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 0 3px rgba(43, 146, 100, 0.3); }
}

.btn-secondary {
    background: transparent;
    color: var(--forro-primary-accent);
    border: 1px solid var(--forro-primary-accent);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: var(--forro-primary-accent);
    color: white;
    outline: 2px solid var(--forro-focus-ring);
    outline-offset: 2px;
}

/* ==========================================================================
   Select2 Searchable Dropdown (Issue #367)
   ========================================================================== */

/* Match Select2 container to Enfold form styling */
.select2-container--default .select2-selection--single {
    height: 40px;
    border: 1px solid var(--forro-border);
    border-radius: 4px;
    background-color: var(--forro-bg-white);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    padding-left: 0.6rem;
    padding-right: 50px; /* Space for clear button + arrow */
    color: var(--forro-text-primary);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
    width: 25px;
    right: 1px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--forro-text-muted);
}

/* Dropdown styling */
.select2-dropdown {
    border: 1px solid var(--forro-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.select2-container--default .select2-results__option {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--forro-primary-accent);
    color: var(--forro-bg-white);
}

.select2-container--default .select2-results__option--selected {
    background-color: #f0f0f0; /* Select2-specific selected state */
}

/* Search input styling */
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--forro-border);
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--forro-primary-accent);
    outline: none;
}

/* Clear button styling - positioned left of arrow with adequate spacing */
.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--forro-text-muted);
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0 5px;
    cursor: pointer;
    line-height: 1;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: var(--forro-primary-accent);
}

/* Focus state */
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--forro-primary-accent);
    outline: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .select2-container--default .select2-selection--single {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        font-size: 16px;
    }
}

/* ==========================================================================
   Show Past Events Toggle (Issue #331)
   ========================================================================== */

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--forro-primary-accent);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    accent-color: var(--forro-primary-accent);
}

.checkbox-label:hover {
    color: var(--forro-primary-accent-hover);
}

/* Issue #352: Inline checkbox for "Include nearby areas" under location dropdown */
.checkbox-label--inline {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 400;
}

.checkbox-label--inline input[type="checkbox"] {
    width: 0.95rem;
    height: 0.95rem;
}

/* ==========================================================================
   Past Event Visual Distinction (Issue #331)
   ========================================================================== */

.event-card.is-past {
    opacity: 0.75;
    position: relative;
}

.event-card.is-past .event-thumbnail {
    filter: grayscale(40%);
}

.past-event-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--forro-past);
    color: white;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    z-index: 1;
}

/* ==========================================================================
   Cancelled Event Visual Distinction (P2/E68/S1 #1445 Part 3)
   Mirrors the past-event pattern: muted card, strikethrough title, and a
   prominent badge. Cancelled events stay visible — the badge is the signal.
   ========================================================================== */

.event-card.is-cancelled {
    opacity: 0.85;
    position: relative;
}

.event-card.is-cancelled .event-title a {
    text-decoration: line-through;
}

.cancelled-event-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: #c0392b;
    color: white;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.forro-event-cancellation-banner {
    background: #fef0ed;
    border: 2px solid #c0392b;
    border-left-width: 6px;
    color: #7a1c12;
    padding: 0.9rem 1.2rem;
    margin: 0 0 1.25rem;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: baseline;
}

.forro-event-cancellation-banner strong {
    color: #c0392b;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.forro-event-single.is-cancelled .forro-event-title {
    text-decoration: line-through;
    color: #7a1c12;
}

/* ==========================================================================
   Ended Recurring Series (P2/E71/S8 #1811)
   Structural clone of the cancellation banner above — same layout rules, a
   softer palette. A decayed series is "we can no longer confirm this", not
   "this is cancelled", so it advises rather than alarms.
   ========================================================================== */

.forro-event-series-ended-banner {
    background: #fdf6e3;
    border: 2px solid #b7791f;
    border-left-width: 6px;
    color: #6b5310;
    padding: 0.9rem 1.2rem;
    margin: 0 0 1.25rem;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: baseline;
}

.forro-event-series-ended-banner strong {
    color: #b7791f;
    font-size: 1.05rem;
}

.recurrence-info.is-ended .recurrence-pattern strong {
    color: var(--forro-past);
}

.recurrence-ended-note {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--forro-past);
}

/* ==========================================================================
   Inactive Creator Visual Distinction (#985)
   ========================================================================== */

.creator-card.is-inactive {
    opacity: 0.75;
    position: relative;
}

.creator-card.is-inactive .creator-photo img {
    filter: grayscale(40%);
}

.inactive-creator-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--forro-past);
    color: white;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    z-index: 1;
}

/* ==========================================================================
   Single Pages
   ========================================================================== */

.forro-creator-single,
.forro-event-single {
    max-width: 800px;
    margin: 0 auto;
}

.forro-creator-header,
.forro-event-header {
    text-align: center;
    margin: 2rem 0 3rem;
}

.forro-creator-title,
.forro-event-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--forro-text-primary);
}

.creator-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.creator-photo {
    text-align: center;
}

.creator-thumbnail {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

.creator-info h3,
.event-info-grid h3 {
    color: var(--forro-primary-accent);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.creator-bio,
.creator-location,
.creator-website,
.creator-contact,
.creator-social,
.creator-status,
.creator-organized-events {
    margin-bottom: 2rem;
}

.creator-website a,
.creator-email a {
    color: var(--forro-primary-accent);
    text-decoration: none;
}

.creator-website a:hover,
.creator-email a:hover {
    text-decoration: underline;
}

/* Event Details */
.event-details-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--forro-bg-light);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.event-details-block h4 {
    color: var(--forro-primary-accent);
    margin-bottom: 0.5rem;
}

/* Event Details Grid (from shortcode) */
.event-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--forro-bg-light);
    padding: 1.5rem;  /* Reduced from 2rem to match other sections */
    border-radius: 8px;
    margin: 0;  /* Remove margin since parent section provides spacing */
}

.event-details-grid h4 {
    color: var(--forro-primary-accent);
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.event-details-grid p {
    margin: 0;
    line-height: 1.5;
}

/* Pricing and Contact sections - stacked layout (except in main event sections) */
.event-pricing,
.event-contact {
    background: var(--forro-bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Override for pricing section inside main event sections - remove container styling */
.forro-event-content .forro-event-pricing-section .event-pricing {
    background: none;
    padding: 0;
    border-radius: 0;
    margin: 0;
}

.event-pricing h3,
.event-contact h3 {
    color: var(--forro-primary-accent);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.event-pricing .price-amount {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 0.5rem 0;
}

/* External link button styling */
.event-external-link {
    margin: 1.5rem 0;
}

/* Talent section wrapper */
.event-talent-wrapper {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--forro-border-light);
}

/* Clear any Enfold section floats/margins */
.event-talent-wrapper .av_section,
.event-talent-wrapper [class*="av_section"] {
    margin: 0 !important;
    padding: 1rem 0 !important;
}

.forro-event-single {
    margin-bottom: 2rem;
}

/* Register button now uses Enfold theme classes (avia-button)
 * See single-forro_event.php - Issue #326
 * Keeping margin-top for spacing within pricing section
 */
.event-pricing .avia-button {
    margin-top: 1rem;
}

/* External link icon styling - Issue #327 */
.forro-external-link .forro-external-icon {
    display: inline-block;
    margin-left: 0.5em;
    vertical-align: middle;
}

.forro-external-link .forro-external-icon svg {
    width: 0.875em;
    height: 0.875em;
}

/* Screen reader only text - WordPress core pattern */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.pricing-notes {
    font-size: 0.9rem;
    color: var(--forro-text-secondary);
    margin-top: 0.5rem;
}

/* ==========================================================================
   Single Event Page Sections (#463)
   ========================================================================== */

/* Section spacing - consistent vertical rhythm */
.forro-event-single .forro-event-section {
    margin: 1.5rem 0;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--forro-border);
}

.forro-event-content .forro-event-section {
    margin: 1.5rem 0;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--forro-border);
}

.forro-event-single .forro-event-section:last-child,
.forro-event-content .forro-event-section:last-child {
    border-bottom: none;
}

/* Override for key details section to maintain its container styling */
.forro-event-content .forro-event-key-details {
    margin: 1.5rem 0;
    padding: 0;  /* Let internal elements handle padding */
    border-bottom: 1px solid var(--forro-border);
    background: var(--forro-bg-light);
    border-radius: 8px;
}

/* Pricing section should match other sections - no special container styling */
.forro-event-content .forro-event-pricing-section {
    margin: 1.5rem 0;
    padding: 1.5rem 0;  /* Same as other sections */
    border-bottom: 1px solid var(--forro-border);
    background: none;  /* Remove special background */
    border-radius: 0;  /* Remove special rounding */
}

/* Internal content padding for key sections */
.forro-event-key-details .event-details-content {
    padding: 1.5rem;  /* Consistent internal padding */
}

/* Pricing section content should match other sections */
.forro-event-pricing-section .event-pricing {
    padding: 0;  /* Let the section handle spacing */
}

/* Section headings */
.forro-event-single .forro-event-section h3 {
    color: var(--forro-primary-accent);
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.forro-event-content .forro-event-section h3 {
    color: var(--forro-primary-accent);
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

/* Event header styling */
.forro-event-single .forro-event-header {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--forro-border-light);
}

.forro-event-single .forro-event-title {
    margin: 0 0 0.5rem 0;
}

/* Badges container in header */
.forro-event-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Online badge styling */
.forro-event-badges .online-badge,
.forro-event-content span.online-badge {
    display: inline-block;
    background: var(--forro-info);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Free badge styling - high specificity to override theme */
.forro-event-single .free-badge,
.forro-event-badges .free-badge,
.event-types .free-badge,
.forro-event-content span.free-badge {
    display: inline-block;
    background: var(--forro-success);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

/* Key details section (When/Where) */
.forro-event-key-details {
    background: var(--forro-bg-light);
    border-radius: 8px;
    padding: 1.5rem !important;
    margin: 1.5rem 0 !important;
    border-bottom: none;
}

/* Pricing section content styling */
.forro-event-pricing-section .event-pricing {
    margin: 0;
    padding: 0;
    background: none;
}

/* Price styling - consistent across all scenarios */
.forro-event-content .price-amount {
    font-size: 1rem;  /* Smaller font size to maintain hierarchy */
    font-weight: 600;
    margin: 0.25rem 0;
    color: var(--forro-primary-accent);
}

.price-free {
    color: var(--forro-success) !important;  /* Green for free events */
}

/* Event action buttons */
.event-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.event-actions .avia-button {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

/* #1069: Primary CTA — green for Register / Book Now */
.event-actions .avia-button.avia-button-primary {
    background: var(--forro-brand-green);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.3s ease;
}

.event-actions .avia-button.avia-button-primary:hover,
.event-actions .avia-button.avia-button-primary:focus {
    background: var(--forro-brand-green-dark);
    color: white;
    outline: 2px solid var(--forro-brand-green);
    outline-offset: 2px;
}

/* #1069: Secondary CTA — outlined green for View Event Page */
.event-actions .avia-button.avia-button-secondary {
    background: transparent;
    color: var(--forro-brand-green);
    border: 1px solid var(--forro-brand-green);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.event-actions .avia-button.avia-button-secondary:hover,
.event-actions .avia-button.avia-button-secondary:focus {
    background: var(--forro-brand-green);
    color: white;
    outline: 2px solid var(--forro-brand-green);
    outline-offset: 2px;
}

/* Program/Schedule section */
.forro-event-program .schedule-text {
    padding: 0.5rem 0;
    line-height: 1.8;
}

.forro-event-program .recurrence-info {
    margin-bottom: 1rem;
}

/* Additional Information section */
.forro-event-additional-notes .additional-notes-text {
    padding: 0.5rem 0;
    line-height: 1.6;
}

/* Description section */
.forro-event-description {
    line-height: 1.7;
}

/* Organizer section */
.forro-event-organizer p {
    margin: 0.5rem 0;
}

.forro-event-organizer .organizer-email a {
    color: var(--forro-primary-accent);
}

/* Venue details section */
.forro-event-venue .venue-map-link a {
    color: var(--forro-primary-accent);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Venue enrichment fields */
.venue-accessibility,
.venue-parking,
.venue-capacity {
    margin: 0.5rem 0;
    color: var(--forro-text-secondary, #666);
}

/* Talent section */
.forro-event-talent {
    border-bottom: none;
}

/* Single Event Content Sections (legacy support) */
.forro-event-venue,
.forro-event-location,
.forro-event-recurrence,
.event-description {
    margin: 1.5rem 0;
}

.forro-event-venue h3,
.forro-event-location h3,
.forro-event-recurrence h3,
.event-description h3 {
    color: var(--forro-primary-accent);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.forro-event-recurrence .recurrence-pattern {
    margin: 0 0 0.25rem 0;
}

.forro-event-recurrence .recurrence-pattern strong {
    color: inherit;
}

.forro-event-recurrence .recurrence-description {
    margin: 0;
    color: var(--forro-text-secondary);
}

/* Event Talent */
.event-talent-block {
    margin: 3rem 0;
}

.talent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.talent-item {
    text-align: center;
    background: var(--forro-bg-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.talent-photo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.talent-item h4 {
    margin: 0.5rem 0;
}

.talent-item a {
    color: var(--forro-primary-accent);
    text-decoration: none;
}

.talent-item a:hover {
    text-decoration: underline;
}

.talent-role {
    color: var(--forro-text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* ==========================================================================
   Organized Events Grid (on organization creator profiles)
   ========================================================================== */

.creator-organized-events h3 {
    margin-bottom: 1rem;
}

.organized-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 480px) {
    .organized-events-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Creator Relationships (Phase 49 Sprint 3 #1150)
   ========================================================================== */

.creator-team-members {
    margin-bottom: 2rem;
}

.creator-team-members h3 {
    margin-bottom: 1rem;
}

.team-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 480px) {
    .team-members-grid {
        grid-template-columns: 1fr;
    }
}

.creator-organisation {
    margin-bottom: 1.5rem;
}

.creator-organisation h3 {
    margin-bottom: 0.75rem;
}

.creator-organisation .organisation-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.creator-organisation .organisation-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--forro-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--forro-text-primary);
    background: var(--forro-bg-white);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.creator-organisation .organisation-link:hover,
.creator-organisation .organisation-link:focus {
    border-color: var(--forro-brand-green);
    background: var(--forro-bg-light);
}

.creator-organisation .org-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.creator-organisation .org-name {
    font-weight: 500;
}

/* ==========================================================================
   Location Taxonomy
   ========================================================================== */

.forro-location-tabs {
    margin: 2rem 0;
}

.location-nav {
    display: flex;
    gap: var(--forro-spacing-xs, 0.5rem);
    border-bottom: 2px solid var(--forro-border-light);
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.location-nav .tab-button {
    flex-shrink: 0;
    white-space: nowrap;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--forro-text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: var(--forro-primary-accent);
    border-bottom-color: var(--forro-primary-accent);
}

.tab-button:hover,
.tab-button:focus {
    color: var(--forro-primary-accent);
    outline: 2px solid var(--forro-primary-accent);
    outline-offset: 2px;
}

/*
 * Active role sub-filter inside the More Roles tab (#1149).
 * Shown when ?role=X narrows the More Roles list to a specific role
 * (Dancer, Performer, etc.). Rendered between the filter bar and the grid.
 */
.forro-active-role-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: var(--forro-bg-subtle, #f5f5f5);
    border-left: 3px solid var(--forro-primary-accent, #0073aa);
    border-radius: 0.25rem;
    font-size: 0.95rem;
}

.forro-active-role-filter__clear {
    font-size: 0.875rem;
    text-decoration: underline;
}

/*
 * Disabled tab state (role tabs with 0 creators at this location).
 * #top prefix required to override Enfold's default button color (Phase 48 invariant #1).
 * Grey color signals non-clickability; pointer-events blocks interaction.
 */
#top .tab-button-disabled,
#top .tab-button:disabled {
    color: #7f7f7f;
    cursor: not-allowed;
    pointer-events: none;
    border-bottom-color: transparent;
}

#top .tab-button-disabled:hover,
#top .tab-button-disabled:focus,
#top .tab-button:disabled:hover,
#top .tab-button:disabled:focus {
    color: #7f7f7f;
    outline: none;
    border-bottom-color: transparent;
}

.tab-content {
    display: none;
    margin-top: 2rem;
}

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

/* ==========================================================================
   Upcoming Events Widget
   ========================================================================== */

.forro-upcoming-events {
    background: var(--forro-bg-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.upcoming-events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.upcoming-event-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
}

.event-date {
    text-align: center;
    min-width: 60px;
}

.event-date .date {
    display: block;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--forro-primary-accent);
}

.event-date .time {
    display: block;
    font-size: 0.8rem;
    color: var(--forro-text-secondary);
}

.event-details h4 {
    margin: 0 0 0.3rem 0;
    font-size: 1rem;
}

.event-details h4 a {
    color: var(--forro-text-primary);
    text-decoration: none;
}

.event-details h4 a:hover {
    color: var(--forro-primary-accent);
}

.event-details .location {
    margin: 0;
    font-size: 0.8rem;
    color: var(--forro-text-secondary);
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: var(--forro-text-secondary);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--forro-text-secondary);
}

.no-results p {
    font-size: 1.1rem;
}

/* Empty State Component (Phase 18 Issue #279) */
.forro-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--forro-text-secondary);
}

.forro-empty-state__icon {
    margin-bottom: 1.25rem;
    color: var(--forro-text-muted);
}

.forro-empty-state__icon svg {
    opacity: 0.6;
}

.forro-empty-state__message {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--forro-text-dark);
    margin-bottom: 0.5rem;
}

.forro-empty-state__sub-message {
    font-size: 0.95rem;
    color: var(--forro-text-soft);
    margin-bottom: 1.25rem;
}

.forro-empty-state__clear-btn {
    margin-top: 0.5rem;
}

.filter-error {
    background: var(--forro-danger-bg);
    color: var(--forro-danger-text);
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

/* ==========================================================================
   Archive Headers
   ========================================================================== */

.forro-archive-header {
    text-align: center;
    margin: 3rem 0;
}

.forro-archive-header h1 {
    font-size: 2.5rem;
    color: var(--forro-text-primary);
    margin-bottom: 1rem;
}

.forro-archive-header p {
    font-size: 1.2rem;
    color: var(--forro-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination-wrapper {
    text-align: center;
    margin: 3rem 0;
}

.page-numbers {
    display: inline-block;
    padding: 0.5rem 0.8rem;
    margin: 0.2rem;
    background: var(--forro-bg-light);
    color: var(--forro-text-primary);
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.page-numbers:hover,
.page-numbers:focus,
.page-numbers.current {
    background: var(--forro-primary-accent);
    color: white;
    outline: 2px solid var(--forro-primary-accent);
    outline-offset: 2px;
}

/* Top pagination - more compact styling (Issue #354) */
.pagination-wrapper--top {
    margin: 0 0 1.5rem;
}

.pagination-wrapper--top .page-numbers {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
}

/* ==========================================================================
   Mobile Responsiveness
   ========================================================================== */

@media (max-width: 768px) {
    .creators-list,
    .events-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .forro-filters .filter-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-actions {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .creator-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .event-details-block,
    .event-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .talent-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .forro-creator-title,
    .forro-event-title {
        font-size: 2rem;
    }
    
    .forro-archive-header h1 {
        font-size: 2rem;
    }
    
    .location-nav {
        flex-direction: row;
        scroll-snap-type: x mandatory;
        padding-bottom: 0.25rem;
    }

    .tab-button {
        text-align: center;
        border-bottom: 3px solid transparent;
        border-left: none;
        scroll-snap-align: start;
        padding: 0.75rem 1rem;
    }

    .tab-button.active {
        border-bottom-color: var(--forro-primary-accent);
        border-left: none;
    }

    .forro-location-tabs {
        position: relative;
    }

    .forro-location-tabs::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 2rem;
        background: linear-gradient(to right, transparent, var(--forro-background, #fff));
        pointer-events: none;
    }
}

@media (max-width: 480px) {
    .forro-filters-container {
        padding: 1rem;
    }

    .creator-card,
    .event-card {
        margin: 0 0.5rem;
    }

    .upcoming-event-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .event-date {
        min-width: auto;
    }
}

/* ==========================================================================
   Event Flyer Images Gallery (#745, #1010)
   ========================================================================== */

.forro-event-images {
    margin-bottom: 2rem;
}

.event-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 4px;
    margin-bottom: 1.5rem;
}

.event-images-gallery .event-image {
    margin: 0;
    height: auto; /* Override global .event-image { height: 200px } */
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
}

.event-images-gallery .event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.event-images-gallery .event-image img:hover {
    transform: scale(1.05);
}

.event-images-gallery .event-image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Single image — full content width, original aspect ratio (#1048) */
.event-images-gallery--single {
    grid-template-columns: 1fr;
}

.event-images-gallery--single .event-image {
    aspect-ratio: auto;
}

.event-images-gallery--single .event-image img {
    height: auto;
    object-fit: contain;
}

/* #1054: Override Enfold's #top img { max-width:100% } — needs ID-level specificity */
#top .event-images-gallery--single .event-image img {
    width: 100%;
    max-width: none;
}

@media (min-width: 600px) {
    .event-images-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
    .event-images-gallery--single {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 900px) {
    .event-images-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
    .event-images-gallery--single {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Phase 39 (#909): "Suggest an edit" link on single event pages
   ========================================================================== */

.forro-suggest-edit-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--forro-text-secondary);
    text-decoration: none;
    border-bottom: 1px dotted var(--forro-text-muted);
}

.forro-suggest-edit-link:hover {
    color: #4caf50;
    border-bottom-color: #4caf50;
}

/* Phase 42: Submit CTA on location pages (#968) */
.forro-submit-cta {
    text-align: center;
    margin: 2rem 0 1rem;
}

.forro-submit-cta .btn-primary {
    display: inline-block;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.75rem 2rem;
}

/* ==========================================================================
   Past Events Toggle on Creator Profiles (#1134)
   ========================================================================== */

#top .creator-past-events {
    display: none;
}

#top .creator-past-events.is-expanded {
    display: block;
}

.creator-past-toggle {
    background: none;
    border: none;
    color: var(--forro-brand-green);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    text-decoration: underline;
}

.creator-past-toggle:hover {
    color: var(--forro-brand-green-dark);
}

/* === Phase 56 / Sprint 2 — Projects template additions === */

/*
 * Project cards reuse .event-card markup so they look identical to event/
 * creator cards. The .is-inactive modifier mirrors .creator-card.is-inactive
 * — the same visual treatment for "this entity isn't currently active".
 */
.event-card.is-inactive {
    opacity: 0.7;
}

.event-card.is-inactive .event-title a {
    color: var(--forro-text-secondary);
}

/*
 * Inactive-project badge reuses .past-event-badge structure (identical
 * positioning, colour). The class name is a modifier so we can style it
 * separately later if product wants to differentiate "past event" from
 * "inactive project".
 */
.inactive-project-badge {
    background-color: var(--forro-text-secondary);
}

/*
 * Project card creator line. .event-location is reused so the typography
 * and spacing match; .project-creators just lets us target the link colour
 * inside without affecting the location line.
 */
.event-location.project-creators a {
    color: var(--forro-brand-green);
    text-decoration: none;
}

.event-location.project-creators a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   P2/E74/S1 (#1781): Content feedback — "Report a problem / Give feedback"
   on single event / creator / project pages.

   Sits in the page <header> next to .forro-suggest-edit-link, so it is
   visible without scrolling past the main content (operator ruling wh#300).
   Reuses the existing token set and the .event-actions primary-button
   treatment verbatim — no new design system.
   ========================================================================== */

.forro-content-feedback {
    margin-top: 12px;
}

/* Matches .forro-suggest-edit-link's weight so the two sibling affordances
   read as one row of secondary actions rather than competing controls. */
.forro-content-feedback__toggle {
    display: inline-block;
    font-size: 13px;
    color: var(--forro-text-secondary);
    border-bottom: 1px dotted var(--forro-text-muted);
    cursor: pointer;
    list-style: none;
}

/* Suppress the native disclosure triangle in both engines; the dotted
   underline is the affordance. */
.forro-content-feedback__toggle::-webkit-details-marker {
    display: none;
}

.forro-content-feedback__toggle::marker {
    content: '';
}

.forro-content-feedback__toggle:hover,
.forro-content-feedback[open] > .forro-content-feedback__toggle {
    color: var(--forro-brand-green);
    border-bottom-color: var(--forro-brand-green);
}

.forro-content-feedback__toggle:focus-visible {
    outline: 2px solid var(--forro-focus-ring);
    outline-offset: 2px;
}

/* `margin: … auto` is load-bearing, not cosmetic tidying: the post header is
   centered (title + toggle), so a max-width panel without auto side margins
   sits flush left in the content column with dead space to its right.
   Reported by the operator against the project page, 2026-08-10. */
.forro-content-feedback__panel {
    max-width: 34rem;
    margin: 0.75rem auto 0;
    padding: 1rem;
    background: var(--forro-bg-light);
    border: 1px solid var(--forro-border);
    border-radius: 4px;
}

.forro-content-feedback__intro {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: var(--forro-text-secondary);
}

.forro-content-feedback__field {
    margin: 0 0 0.75rem;
}

.forro-content-feedback__field label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    color: var(--forro-text-dark);
}

.forro-content-feedback__required {
    color: var(--forro-danger-text);
}

.forro-content-feedback__message,
.forro-content-feedback__email {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--forro-border);
    border-radius: 4px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

/* Override Enfold's #top input/textarea margin — needs ID-level specificity,
   same reason as the .filter-group overrides above (#1068). */
#top .forro-content-feedback__message,
#top .forro-content-feedback__email {
    margin-bottom: 0;
}

#top .forro-content-feedback__field label {
    font-weight: 400;
}

.forro-content-feedback__message {
    min-height: 5.5rem;
    resize: vertical;
}

/* Honeypot: removed from view without display:none, which some bots skip. */
.forro-content-feedback__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.forro-content-feedback__actions {
    margin: 0;
}

.forro-content-feedback__actions .avia-button.avia-button-primary {
    background: var(--forro-brand-green);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.forro-content-feedback__actions .avia-button.avia-button-primary:hover,
.forro-content-feedback__actions .avia-button.avia-button-primary:focus {
    background: var(--forro-brand-green-dark);
    color: white;
    outline: 2px solid var(--forro-brand-green);
    outline-offset: 2px;
}

.forro-content-feedback__actions .avia-button.avia-button-primary[disabled] {
    background: var(--forro-past);
    cursor: not-allowed;
}

.forro-content-feedback__status {
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
}

/* Empty status region must not reserve vertical space before first use. */
.forro-content-feedback__status:empty {
    margin: 0;
}

.forro-content-feedback__status--success {
    color: var(--forro-success);
}

.forro-content-feedback__status--error {
    color: var(--forro-danger-text);
}

.forro-content-feedback__noscript {
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
    color: var(--forro-text-secondary);
}

/* The `hidden` attribute is ONLY `display:none` in the UA stylesheet, so any
   author rule setting `display` beats it. Enfold ships exactly that —
   `body div .avia-button { … display:inline-block }` in
   avia-shortcodes/buttons/buttons.min.css — which silently defeated
   `submitEl.hidden = true` on the success path: the submit button stayed
   visible (greyed, because still disabled) next to the thank-you message.
   The `#top` prefix is the plugin's established Enfold-override idiom and
   outranks that rule. */
#top .forro-content-feedback [hidden] {
    display: none;
}

/* Post-success end state: the panel shows only the confirmation. Leaving the
   cleared fields in place with no submit button invites a visitor to type a
   second report they have no way to send. */
.forro-content-feedback--sent .forro-content-feedback__intro,
.forro-content-feedback--sent .forro-content-feedback__field,
.forro-content-feedback--sent .forro-content-feedback__actions {
    display: none;
}
