/* iHowz Events Frontend Styles */

/* Event List Styles */
.ihowz-events-list {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.ihowz-event-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ihowz-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.event-title {
    margin: 0;
    color: #333;
    font-size: 1.3em;
    flex: 1;
}

.event-type {
    background: #f1f1f1;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.member-only-badge {
    background: #6f42c1;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-left: 5px;
}

.event-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.event-date {
    font-weight: bold;
    color: #0073aa;
}

.event-location {
    color: #666;
}

.event-price {
    font-weight: bold;
    color: #28a745;
}

.event-price.free {
    color: #17a2b8;
}

.regular-price {
    text-decoration: line-through;
    color: #999;
    font-weight: normal;
    margin-left: 5px;
}

.event-description {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.6;
}

.event-actions {
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.booking-status {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
}

.booking-status.booked {
    background: #d4edda;
    color: #155724;
}

.booking-status.members-only {
    background: #f8d7da;
    color: #721c24;
}

.booking-status.full {
    background: #fff3cd;
    color: #856404;
}

.booking-status.no-booking {
    background: #e2e3e5;
    color: #383d41;
}

/* Button Styles */
.ihowz-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s ease;
    text-align: center;
}

.ihowz-btn:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.ihowz-btn-primary {
    background: #0073aa;
}

.ihowz-btn-primary:hover {
    background: #005a87;
}

.ihowz-btn-danger {
    background: #dc3545;
}

.ihowz-btn-danger:hover {
    background: #c82333;
}

.ihowz-btn-warning {
    background: #ffc107;
    color: #212529;
}

.ihowz-btn-warning:hover {
    background: #e0a800;
    color: #212529;
}

.ihowz-btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

/* Booking Form Styles */
.ihowz-event-booking-container {
    max-width: 800px;
    margin: 0 auto;
}

.event-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.event-details h3 {
    margin-top: 0;
    color: #333;
}

.event-meta p {
    margin: 8px 0;
}

.booking-form {
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.booking-form h4 {
    margin-top: 0;
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-row textarea {
    resize: vertical;
    min-height: 80px;
}

.booking-total {
    background: #e8f5e8;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    text-align: center;
}

.booking-total p {
    margin: 0;
    font-size: 1.2em;
}

.booking-status-message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.booking-status-message.already-booked {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.booking-status-message.members-only {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.booking-status-message.event-full {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.no-booking-required {
    background: #e2e3e5;
    color: #383d41;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

/* Upcoming Events Widget */
.ihowz-upcoming-events {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.ihowz-upcoming-events h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.upcoming-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.upcoming-event-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.upcoming-event-item:last-child {
    border-bottom: none;
}

.event-date {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    font-weight: bold;
    color: #0073aa;
    font-size: 0.9em;
}

.event-details {
    flex: 1;
}

.event-details h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.event-type {
    color: #666;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-description {
    color: #555;
    margin: 5px 0;
    font-size: 0.9em;
}

/* My Bookings Table */
.ihowz-my-bookings {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.ihowz-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.ihowz-table th,
.ihowz-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.ihowz-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.ihowz-table tr:hover {
    background: #f8f9fa;
}

/* Calendar Styles */
.ihowz-events-calendar {
    margin: 20px 0;
}

#ihowz-calendar {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
}

/* Reduce height of frontend calendar day cells */
#ihowz-calendar .fc-daygrid-day {
    height: 60px !important; /* Reduced from default ~120px */
    min-height: 60px !important;
}

#ihowz-calendar .fc-daygrid-day-frame {
    min-height: 60px !important;
}

#ihowz-calendar .fc-daygrid-day-events {
    margin-top: 2px;
    min-height: 20px;
}

/* Adjust event display in smaller cells */
#ihowz-calendar .fc-daygrid-event {
    font-size: 11px;
    padding: 1px 3px;
    margin-bottom: 1px;
}

/* Adjust day number positioning */
#ihowz-calendar .fc-daygrid-day-number {
    padding: 4px;
    font-size: 12px;
}

/* Ensure "more" link is visible in compact view */
#ihowz-calendar .fc-daygrid-more-link {
    font-size: 10px;
    padding: 1px 3px;
}

/* Event Details Popup */
.ihowz-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.ihowz-popup {
    background: white;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.ihowz-event-details-popup {
    padding: 20px;
}

.ihowz-event-details-popup h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.member-only-notice {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.event-full {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
}

.no-booking-required {
    background: #e2e3e5;
    color: #383d41;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
}

/* Event Modal Layout */
.ihowz-event-details-popup {
    padding: 0;
}

.event-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 20px 15px;
    border-bottom: 1px solid #eee;
}

.event-modal-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #1e3a5f;
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    min-width: 60px;
    text-align: center;
}

.event-modal-date .day {
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1;
}

.event-modal-date .month {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-modal-date .year {
    font-size: 0.7rem;
    opacity: 0.9;
}

.event-modal-header-content {
    flex: 1;
}

.event-modal-header-content .event-type-badge {
    display: inline-block;
    background: #f1f1f1;
    color: #666;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.event-modal-header-content h2 {
    margin: 0 0 5px;
    color: #1e3a5f;
    font-size: 1.4rem;
}

.event-modal-header-content .subtitle {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.event-modal-body {
    padding: 20px;
}

.event-modal-description {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.6;
}

.event-modal-description p {
    margin: 0 0 10px;
}

.event-modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.event-modal-info-grid .info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
}

.event-modal-info-grid .info-item .dashicons {
    color: #1e3a5f;
    font-size: 20px;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.event-modal-info-grid .info-item div {
    display: flex;
    flex-direction: column;
}

.event-modal-info-grid .info-item strong {
    color: #333;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.event-modal-info-grid .info-item span {
    color: #666;
    font-size: 0.9rem;
}

.event-modal-sidebar {
    padding: 0 20px 20px;
}

.event-modal-sidebar .booking-card {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
}

.event-modal-sidebar .booking-price {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.event-modal-sidebar .price-amount {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e3a5f;
}

.event-modal-sidebar .price-amount.free {
    color: #28a745;
}

.event-modal-sidebar .member-price {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-top: 4px;
}

.event-modal-sidebar .form-field {
    margin-bottom: 12px;
}

.event-modal-sidebar .form-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
}

.event-modal-sidebar .form-field input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.event-modal-sidebar .spots-warning {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.event-modal-sidebar .spots-warning .dashicons {
    color: #856404;
    vertical-align: middle;
}

.event-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.event-modal-footer .view-full-page {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1e3a5f;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.event-modal-footer .view-full-page:hover {
    color: #2c5282;
}

.event-modal-footer .view-full-page .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.event-modal-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.event-modal-loading .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #1e3a5f;
}

.event-modal-loading .spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.event-error {
    color: #dc3545;
    text-align: center;
    padding: 30px;
}

/* No Events Message */
.no-events {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

/* Modal Responsive Layout */
@media (min-width: 769px) {
    .ihowz-event-details-popup {
        display: grid;
        grid-template-columns: 1fr 300px;
        grid-template-areas:
            "header header"
            "hero sidebar"
            "body sidebar"
            "footer footer";
    }
    .event-modal-header {
        grid-area: header;
    }
    .event-hero {
        grid-area: hero;
    }
    .event-modal-body {
        grid-area: body;
        border-right: 1px solid #eee;
    }
    .event-modal-sidebar {
        grid-area: sidebar;
        padding: 20px;
    }
    .event-modal-footer {
        grid-area: footer;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .ihowz-event-card {
        padding: 15px;
    }
    
    .event-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-meta {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .upcoming-event-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .event-date {
        width: auto;
        text-align: left;
    }
    
    .ihowz-table {
        font-size: 14px;
    }
    
    .ihowz-table th,
    .ihowz-table td {
        padding: 8px;
    }
    
    .ihowz-popup {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .event-modal-header {
        flex-direction: column;
        gap: 15px;
    }

    .event-modal-info-grid {
        grid-template-columns: 1fr;
    }

    .event-modal-sidebar {
        padding: 0 15px 15px;
    }

    .event-modal-footer {
        text-align: center;
    }

    .ihowz-event-card .event-image {
        margin: -15px -15px 12px;
    }

    .ihowz-single-event .event-hero img {
        height: 220px;
    }

    .event-logo {
        max-height: 48px;
        margin-right: 10px;
    }
}

@media (max-width: 480px) {
    .form-row input,
    .form-row select,
    .form-row textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .ihowz-btn {
        width: 100%;
        padding: 12px;
    }
}
/* Event documents (agenda/poster downloads) */
.ihowz-event-documents {
    margin-top: 25px;
}

.ihowz-event-documents h2,
.ihowz-event-documents h3 {
    margin-bottom: 10px;
}

.ihowz-event-documents ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ihowz-event-documents li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.ihowz-event-documents .dashicons {
    vertical-align: middle;
    margin-right: 4px;
}

.ihowz-event-documents .document-size {
    color: #777;
    font-size: 0.9em;
    margin-left: 6px;
}

.ihowz-event-documents .document-flag {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    font-size: 0.8em;
    border-radius: 10px;
    background: #f0f0f1;
    color: #50575e;
}

.ihowz-event-documents .event-document-locked {
    color: #50575e;
}

/* -------------------------------------------------
   Event map (pinned locations)
   ------------------------------------------------- */
.event-map {
    margin: 15px 0;
}

.ihowz-map {
    height: 220px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    overflow: hidden;
    background: #f6f7f7;
}

.ihowz-map-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.9em;
}

.ihowz-popup .ihowz-map {
    height: 200px;
}

/* Event pictures — featured image + logo (@since 2.15.0) */
.ihowz-event-card .event-image {
    margin: -20px -20px 15px; /* bleed the crop into the card padding, flush rounded top */
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.ihowz-event-card .event-image img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.ihowz-single-event .event-hero,
.ihowz-event-details-popup .event-hero {
    margin: 0 0 20px;
}

.ihowz-event-details-popup .event-hero {
    margin: 15px 20px 0; /* the modal grid rows need their own inset */
}

.event-hero img {
    display: block;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.ihowz-single-event .event-hero img {
    height: 340px;
}

.ihowz-event-details-popup .event-hero img {
    height: 240px;
}

.event-logo {
    float: left;
    margin: 0 15px 10px 0;
    max-height: 72px;
    width: auto;
    object-fit: contain;
}

.event-modal-header-content .event-logo {
    max-height: 56px;
}

/* ==========================================================================
   Event page layout v2 (@since 2.16.0) — the /events/<slug>/ page per the
   agreed sketch: full-bleed 400px hero image with the event name inside a
   standard page-width container, white text on iHowz green *behind the text
   only*; below it a two-column body — description + date/time/location rows
   on the left, organiser logo, venue map and booking card down the right.
   All scoped to the router's main.ihowz-event-page so the modal and any
   .ihowz-single-event embeds keep their inset look.
   ========================================================================== */

/* Green behind the title text only. box-decoration-break: clone gives every
   wrapped line its own band instead of one ragged rectangle. Kept global on
   purpose: embeds without the page CSS still render a legible title. */
.event-title-band {
    background: var(--primary-green, #9cc130);
    color: #fff;
    padding: 0.15em 0.4em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* Hero: image is absolutely positioned inside the band; the title container
   sits at the top of it (badge immediately underneath — 2.16.0 tweak).
   Mirrors the theme .container width so the title lines up with the columns
   below. */
.ihowz-event-page .event-hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    width: 100vw;
    max-width: 100vw;
    margin: 0 0 30px;
    margin-left: calc(50% - 50vw);
    min-height: 400px;
    background: var(--primary-charcoal, #263238); /* no featured image, no dead band */
    overflow: hidden;
}

.ihowz-event-page .event-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Light scrim so white-on-green stays readable over pale or busy photos. */
.ihowz-event-page .event-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.ihowz-event-page .event-hero-inner {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 32px 20px;
    box-sizing: border-box;
}

/* No featured image: the whole band goes iHowz green instead of the photo,
   so it reads as a deliberate block rather than a missing image. The photo
   scrim is dropped (there is nothing to scrim) and the title's green text
   highlight flips to plain charcoal text — green on green would vanish. */
.ihowz-event-page .event-hero-no-image {
    min-height: 240px;
    background: var(--primary-green, #9cc130);
}

.ihowz-event-page .event-hero-no-image::before {
    content: none;
}


.ihowz-event-page .event-hero .event-type-badge {
    display: inline-block;
    margin: 12px 0 0;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ihowz-event-page .event-hero .event-title {
    margin: 0;
    flex: none;
    color: #fff;
    font-size: clamp(1.6rem, 3.5vw, 3rem);
    line-height: 1.4;
}

.ihowz-event-page .event-hero .event-subtitle {
    margin: 10px 0 0;
    color: #fff;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* Green-band (no-image) text overrides — placed after the base rules above so
   they win at equal specificity: title drops its (now green-on-green) text
   highlight for plain charcoal, and the badge becomes a solid charcoal chip. */
.ihowz-event-page .event-hero-no-image .event-title-band {
    background: transparent;
    color: var(--primary-charcoal, #263238);
    padding: 0;
}

.ihowz-event-page .event-hero-no-image .event-type-badge {
    background: var(--primary-charcoal, #263238);
}

.ihowz-event-page .event-hero-no-image .event-subtitle {
    color: var(--primary-charcoal, #263238);
    text-shadow: none;
}

/* Events without a photo reuse the site's standard page header band
   (.page-header-fullwidth — the light-green roofline header every theme
   page gets, styled by the theme itself). These rules only add the gap to
   the columns below and the type-badge chip sitting under the title. */
.ihowz-event-page .event-standard-header {
    margin-bottom: 30px;
}

.ihowz-event-page .event-standard-header .event-type-badge {
    display: inline-block;
    margin: 12px 0 0;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--primary-charcoal, #263238);
    color: #fff;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Standard page width for everything under the hero (theme .container maths). */
.ihowz-event-page .event-body,
.ihowz-event-page .event-footer-nav {
    width: 90%;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Two-column body: description + detail rows left; logo, map, booking right. */
.ihowz-event-page .event-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.ihowz-event-page .event-description {
    font-size: 1.05em;
    line-height: 1.7;
}

.ihowz-event-page .event-description img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Date / Time / Location rows, stacked under the description per the sketch. */
.ihowz-event-page .event-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 25px;
}

.ihowz-event-page .info-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    background: #f8f9fa;
    border-left: 4px solid var(--primary-green, #9cc130);
    border-radius: 6px;
}

.ihowz-event-page .info-item .dashicons {
    flex-shrink: 0;
    color: var(--secondary-forest-green, #77ae02);
}

.ihowz-event-page .info-item div {
    min-width: 0;
}

.ihowz-event-page .info-item div strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.ihowz-event-page .info-item div span {
    display: block;
    color: #333;
    overflow-wrap: break-word;
}

.ihowz-event-page .event-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ihowz-event-page .event-sidebar .event-logo {
    float: none;
    align-self: flex-end; /* logo sits top-right of the page, as sketched */
    margin: 0;
    max-height: 110px;
    max-width: 60%;
    width: auto;
    object-fit: contain;
}

.ihowz-event-page .event-map {
    margin: 0;
}

.ihowz-event-page .ihowz-map {
    height: 300px;
}

.ihowz-event-page .booking-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-top: 4px solid var(--primary-green, #9cc130);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ihowz-event-page .booking-price {
    margin-bottom: 12px;
}

.ihowz-event-page .price-amount {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-charcoal, #263238);
}

.ihowz-event-page .price-amount.free {
    color: var(--secondary-forest-green, #77ae02);
}

.ihowz-event-page .member-price {
    display: block;
    font-size: 0.9rem;
    color: #666;
}

/* Booking form: every field shares one inset and runs the full width of
   the card, dressed in the same shape as the Register Now / Book Now
   button (2px border, 10px radius — the theme's .button tokens) with a
   gray outline, so labels, inputs and the button read as one block. The
   button itself goes full-width too, so the stack ends flush. Labels sit
   inline at a fixed column beside each field, inputs fill the rest. */
.ihowz-event-page .booking-card .form-field {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
}

.ihowz-event-page .booking-card .form-field label {
    flex: 0 0 140px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
}

.ihowz-event-page .booking-card input[type="text"],
.ihowz-event-page .booking-card input[type="email"],
.ihowz-event-page .booking-card input[type="tel"],
.ihowz-event-page .booking-card select {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 10px 14px;
    border: var(--border-width, 2px) solid #999;
    border-radius: var(--border-radius, 10px);
    background: #fff;
    color: var(--primary-charcoal, #263238);
    font-size: 1rem;
    font-family: inherit;
}

.ihowz-event-page .booking-card input[type="text"]:focus,
.ihowz-event-page .booking-card input[type="email"]:focus,
.ihowz-event-page .booking-card input[type="tel"]:focus,
.ihowz-event-page .booking-card select:focus {
    outline: none;
    border-color: var(--primary-green, #9cc130);
    box-shadow: 0 0 0 3px rgba(156, 193, 48, 0.25);
}

.ihowz-event-page .booking-card button[type="submit"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    /* zero the theme .button's margin-left:20px so it lines up flush with the fields */
    margin: 6px 0 0;
    cursor: pointer;
}

.ihowz-event-page .booking-card .spots-warning {
    margin: 0 0 14px;
}

.ihowz-event-page .event-footer-nav {
    margin: 30px auto 10px;
}

@media (max-width: 782px) {
    .ihowz-event-page .event-hero {
        min-height: 260px;
    }

    .ihowz-event-page .event-hero-no-image {
        min-height: 200px;
    }

    .ihowz-event-page .event-body {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .ihowz-event-page .event-sidebar .event-logo {
        align-self: flex-start;
        max-width: 50%;
    }

    /* narrow screens: labels go back above their fields, inputs full width */
    .ihowz-event-page .booking-card .form-field {
        flex-wrap: wrap;
        gap: 4px 10px;
    }

    .ihowz-event-page .booking-card .form-field label {
        flex: 1 0 100%;
    }
}
