/* overriding all header fonts */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif !important;
}

/* Make the mobile footer use visible emoji icons and text */
.storefront-handheld-footer-bar ul li a {
    text-indent: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    color: #ffffff !important; /* use #333 if your footer is light */
    font-size: 12px !important;
    font-weight: 600 !important;
    text-align: center !important;
    padding-top: 6px !important;
}

.storefront-handheld-footer-bar ul li a::before {
    display: block !important;
    font-family: sans-serif !important;
    font-size: 20px !important;
    margin-bottom: 4px !important;
}

.storefront-handheld-footer-bar ul li.my-account a::before {
    content: "👤" !important;
}

.storefront-handheld-footer-bar ul li.search a::before {
    content: "🔍" !important;
}

.storefront-handheld-footer-bar ul li.cart a::before {
    content: "🛒" !important;
}

  /* Fix the actual image */
  .entry-content .wp-block-image img {
    width: 100% !important;
    height: auto !important;
  }

  /* Fix the caption text (your exact class) */
  .entry-content .wp-element-caption {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    text-align: center;
    box-sizing: border-box;
    padding: 6px 10px;
    line-height: 1.4;
  }

}

.entry-content .wp-element-caption {
  color: #000000;

}

}

/* Remove author name from posts*/
/*.author, put this back in if needed*/
.post-author,
/*.byline, keeps the author on post page*/
.entry-author {
  display: none !important;
}

/* Narrow post content on desktop */
.single-post .content-area {
  max-width: 800px; /* adjust for your taste */
  margin: 0 auto;   /* center the content */
  padding-left: 15px;  /* optional: small padding */
  padding-right: 15px; /* optional: small padding */
}

/* Green Color for events in calendar8/
/* Handle ALL ring variations */
.em-calendar .em-cal-day-date .ring {
    --date-border-color: #2e7d32 !important;
    --date-border-color-top: #2e7d32 !important;
    --date-border-color-right: #2e7d32 !important;
    --date-border-color-bottom: #2e7d32 !important;
    --date-border-color-left: #2e7d32 !important;
}

/* Some rings use different class variations */
.em-calendar .ring.one,
.em-calendar .ring.two,
.em-calendar .ring.three,
.em-calendar .ring.four {
    --date-border-color: #2e7d32 !important;
}

/* Force event blocks inside the calendar */
.em-calendar .em-cal-event {
    --event-background-color: #2e7d32 !important;
    --event-border-color: #2e7d32 !important;
    --event-color: #ffffff !important;
}

/* Fix the popup color line */
.em-calendar-popup .em-event,
.em-calendar-popup .em-event-meta,
.em-calendar-popup .em-event-content {
    border-left: 4px solid #2e7d32 !important;
}

/* Backup: kill any remaining color sources */
.em-calendar .date-day-colors {
    display: none !important;
}

/* Fix the popup/list divider line color */
.em-item.em-event {
    --default-border: #2e7d32 !important;
}

.woocommerce-breadcrumb {
  display: none !important;
}

.page .entry-title { display: none; }

.single-post .blog-image {display:none}


.em.pixelbones a { color: var(--inherit) !important;}
	

/* Make Storefront header full width */
.site-header {
    max-width: 100%;
    width: 100%;
}

.site-header .col-full {
    max-width: 100%;
    padding-left: 2rem;
    padding-right: 2rem;
}

.main-navigation {
    max-width: 100%;
}


/* Make Storefront footer full width */
.site-footer {
    max-width: 100%;
    width: 100%;
}

.site-footer .col-full {
    max-width: 100%;
    padding-left: 2rem;
    padding-right: 2rem;
}

.site-footer {
    background-color: #8a8988; /* example */
    color: #ffffff;
}

@media (max-width: 1024px) {
    .main-navigation ul li a {
        font-weight: 600;
			font-size: 1rem;
    }
}


@media (max-width: 768px) {
    .site-footer .col-full {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 767px) {

    /* Stack logo and hamburger */
    .site-header {
        display: block;
    }

    .site-header .site-branding {
        width: 100% !important;
        text-align: center;
        margin-bottom: 0.5em;
    }

    .site-header .main-navigation {
        width: 100%;
        text-align: center;
    }

    /* Center hamburger */
    .site-header .menu-toggle {
        display: inline-block;
        margin: 0 auto;
    }

    /* Responsive logo sizing */
    .site-header .custom-logo-link img {
        width: 80vw;          /* scales with screen width */
        max-width: 320px;     /* prevents it from getting too large */
        min-width: 180px;     /* prevents it from getting too small */
        height: auto;
    }
}
@media (max-width: 767px) {

    /* Stack stays intact */
    .site-header .site-branding,
    .site-header .main-navigation {
        width: 100%;
        text-align: center;
    }

    /* Neutralize Storefront padding that causes off-center look */
    .site-header .storefront-primary-navigation {
        padding-left: 0;
        padding-right: 0;
    }

    /* Center the hamburger button itself */
    .site-header .menu-toggle {
        float: none;
        display: inline-block;
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    .site-header .menu-toggle {
        margin-top: 0.25em;
    }
}

@media (max-width: 767px) {
    .site-header .custom-logo-link img {
        transform: translateX(-6px);
    }
}

/* Make WooCommerce variation labels larger and bolder for products */
.woocommerce div.product form.cart .variations label {
    font-size: 20px;
    font-weight: 700;
    color: #000;
}

/* Make order item meta data larger in admin for invoices */
.woocommerce_order_items .wc-item-meta,
.woocommerce_order_items .wc-item-meta p,
.woocommerce_order_items .wc-item-meta li {
    font-size: 20px !important;
    line-height: 1.6;
}

.woocommerce_order_items .wc-item-meta strong,
.woocommerce_order_items .wc-item-meta .meta-label {
    font-size: 20px !important;
    font-weight: 700;
}

/* Force footer link color in Storefront */
.site-footer .widget a:not(.button),
.site-footer .widget a:not(.button):visited {
    color: #ffffff !important;
}

.site-footer .widget a:not(.button):hover,
.site-footer .widget a:not(.button):focus {
    color: #e6e6e6 !important;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer a:not(.button),
.site-footer a:not(.button):visited {
    color: #ffffff !important;
}

.site-footer .site-info,
.site-footer .site-info a {
    color: #ffffff !important;
}

.site-footer .site-info {
    color: #ffffff;
    text-align: center;
    font-size: 0.9rem;
}

/* Replace Storefront footer credit with South Dakota Magazine */
.site-footer .site-info {
    font-size: 0; /* hides existing text safely */
    text-align: center;
}

.site-footer .site-info::after {
    content: "© " attr(data-year) "South Dakota Magazine. All rights reserved.";
    font-size: 0.9rem;
    color: #ffffff;
    display: inline-block;
}

/* Ensure Shop product images fit nicely */
.woocommerce ul.products li.product img {
    object-fit: contain; /* contains image in box without cropping */
    width: 100%;
    height: 300px; /* adjust as needed for your grid */
}

.wc-carousel ul.products {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
}

.wc-carousel ul.products li.product {
  min-width: 250px;
  scroll-snap-align: start;
}

.wc-carousel ul.products::-webkit-scrollbar {
  height: 8px;
}

.wc-carousel ul.products::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}


/* adjust footer text to center */
.wp-block-jetpack-contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.wp-block-jetpack-contact-info > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.cc-form-wrapper form {
    width: 100%;
    max-width: 500px; /* or whatever fits your footer/container */
}

.cc-form-wrapper input,
.cc-form-wrapper textarea,
.cc-form-wrapper button {
    width: 100%;
    box-sizing: border-box;
}

/* Help return columns on tablets */
/* TABLET: force true 2x2 grid */
@media (max-width: 1024px) and (min-width: 769px) {
  .tablet-2x2.wp-block-columns {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
  }

  .tablet-2x2.wp-block-columns > .wp-block-column {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* MOBILE: stacked */
@media (max-width: 768px) {
  .tablet-2x2.wp-block-columns {
    display: block !important;
  }

  .tablet-2x2.wp-block-columns > .wp-block-column {
    width: 100% !important;
    margin-bottom: 1.5rem;
  }
}




/* Override theme variables for all EM buttons */
:root {
    --accent-color: #3f7a59;          /* new button background & border */
    --button-primary-color: #ffffff;   /* new button text color */
}

.em.pixelbones .button.button-primary,
.em.pixelbones .input .button.button-primary,
.em.pixelbones .input button.button-primary,
.em.pixelbones .input input[type=button].button-primary,
.em.pixelbones .input input[type=reset].button-primary,
.em.pixelbones .input input[type=submit].button-primary,
.em.pixelbones button.button-primary,
.em.pixelbones input[type=button].button-primary,
.em.pixelbones input[type=reset].button-primary,
.em.pixelbones input[type=submit].button-primary {
    background-color: #3f7a59 !important;
    border-color: #3f7a59 !important;
    color: #ffffff !important;
}

.em.pixelbones .button.button-primary:hover,
.em.pixelbones .input .button.button-primary:hover,
.em.pixelbones .input button.button-primary:hover,
.em.pixelbones .input input[type=button].button-primary:hover,
.em.pixelbones .input input[type=reset].button-primary:hover,
.em.pixelbones .input input[type=submit].button-primary:hover,
.em.pixelbones button.button-primary:hover,
.em.pixelbones input[type=button].button-primary:hover,
.em.pixelbones input[type=reset].button-primary:hover,
.em.pixelbones input[type=submit].button-primary:hover {
    background-color: #2e5c42 !important;  /* darker hover shade */
    border-color: #2e5c42 !important;
    color: #ffffff !important;
}


/* Archive info */
.archive-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

.archive-title {
  text-align: center;
  margin-bottom: 10px;
}

.archive-intro {
  text-align: center;
  margin-bottom: 40px;
  color: #555;
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
}

.year-card {
  background: #f4f4f4;
  padding: 30px 10px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  color: #222;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

.year-card:hover {
  background: #3f7a59;
  color: #ffffff;
  transform: translateY(-4px);
}

.decade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.decade-card {
  background: #f4f4f4;
  padding: 50px 20px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  color: #222;
  border-radius: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.decade-card:hover {
  background: #3f7a59;
  color: #ffffff;
  transform: translateY(-5px);
}



/* code for previous next button boost*/
/* Container spacing */
.post-navigation {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #eee;
  display: flex;
  justify-content: space-between;
}

/* Buttons */
.post-navigation a {
  font-size: 20px;
  font-weight: 800;
  padding: 20px 20px;
  border: 1px solid #ccc;
  background: #ccc;
  text-decoration: none;
}

/* Hover effect */
.post-navigation a:hover {
  background: #f5f5f5;
}

/* Only apply on desktop */
@media (min-width: 768px) {

  .single-post .nav-previous {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
  }

  .single-post .nav-next {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
  }

  .nav-previous a,
  .nav-next a {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    padding: 10px;
    font-size: 14px;
  }
}


/* Increase content font*/
/* Main post content */
.single-post .entry-content {
  font-size: 18px !important;  /* Adjust as needed */
  line-height: 1.5 !important;
}


/* Related Posts area fixes*/
/* Jetpack Related Posts main heading */
.jp-relatedposts-headline,
.jp-relatedposts-headline em {
  font-size: 30px !important;    /* Makes the headline bigger */
  font-weight: 700 !important;    /* Bold for emphasis */
  line-height: 1.3 !important;    /* Better spacing */
  margin-bottom: 20px !important; /* Space below the heading */
}

/* Add spacing below thumbnail */
.jp-relatedposts .jp-relatedposts-post img {
  margin-bottom: 15px;
  display: block;
}

/* Related post titles */
.jp-relatedposts .jp-relatedposts-post .jp-relatedposts-post-title a {
  font-size: 20px !important;   /* Bigger titles */
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

.components-checkbox-control:has(input[aria-label="This is a gift"]) {
    display: none !important;
}


@media screen and (max-width: 480px) {

    /* Keep the multiple-shipping table inside the phone screen */
    .multi-shipping-table-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .multi-shipping-table {
        display: table !important;
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        box-sizing: border-box !important;
        border-collapse: collapse !important;
    }

    .multi-shipping-table tr {
        display: table-row !important;
    }

    .multi-shipping-table th,
    .multi-shipping-table td {
        display: table-cell !important;
        vertical-align: top !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
        overflow-wrap: anywhere !important;
        word-wrap: break-word !important;
    }

    /* Product column */
    .multi-shipping-table th:nth-child(1),
    .multi-shipping-table td:nth-child(1) {
        width: 20% !important;
    }

    /* Quantity column */
    .multi-shipping-table th:nth-child(2),
    .multi-shipping-table td:nth-child(2) {
        width: 12% !important;
        text-align: center !important;
    }

    /* Sent To / Address column */
    .multi-shipping-table th:nth-child(3),
    .multi-shipping-table td:nth-child(3) {
        width: 35% !important;
        overflow-wrap: anywhere !important;
    }

    /* Keep shipping address selectors within their cells */
    .multi-shipping-table .thwma_cart_multi_shipping_display,
    .multi-shipping-table .thwma-cart-shipping-options,
    .multi-shipping-table select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Reduce product thumbnails on narrow screens */
    .multi-shipping-table .checkout-thumbnail-img img {
        max-width: 20px !important;
        height: auto !important;
    }

}


@media screen and (max-width: 480px) {

    /* Remove extra spacing between table columns */
    .multi-shipping-table {
        border-spacing: 0 !important;
        border-collapse: collapse !important;
    }

    .multi-shipping-table th,
    .multi-shipping-table td {
        padding-left: 3px !important;
        padding-right: 3px !important;
        min-width: 0 !important;
    }

    /* Prevent the address dropdown from forcing a wider column */
    .multi-shipping-table select,
    .multi-shipping-table .thwma_cart_multi_shipping_display,
    .multi-shipping-table .thwma-cart-shipping-options {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Remove extra spacing around product content */
    .multi-shipping-table td:nth-child(1) > *,
    .multi-shipping-table td:nth-child(2) > *,
    .multi-shipping-table td:nth-child(3) > * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* =========================================================
   South Dakota Magazine – Event Submission Form  (v2)
   Built from the real Events Manager markup.
   Paste into: Appearance > Customize > Additional CSS
   Everything is scoped to your .css-event-form wrapper, so it
   won't affect the rest of the site.
   ========================================================= */

.css-event-form {
  --g: #4f6f52;            /* brand green (matches Submit button) */
  --g-dark: #3d5a40;
  --tint: #f4f7f3;         /* very light green wash */
  --line: #dde4da;
  --text: #2b2b2b;
  --muted: #6a6f68;
  --r: 6px;
  color: var(--text);
}

/* ---------- 1. Sections and headings ---------- */
.css-event-form form.em.pixelbones section[class*="event-form-"] { margin: 0 0 2.75rem; padding: 0; }
.css-event-form form.em.pixelbones section.event-form-submitter,
.css-event-form form.em.pixelbones section.event-form-bookings { margin: 0; }

.css-event-form form.em.pixelbones :is(h3, h4) {
  margin: 0 0 1.25rem;
  padding: 0 0 .6rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--text);
}
.css-event-form form.em.pixelbones :is(h3, h4) label { display: inline; margin: 0; font: inherit; color: inherit; }

/* ---------- 2. Labels, sub-headings, help text ---------- */
.css-event-form form.em.pixelbones label {
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
/* labels that sit above a field */
.css-event-form form.em.pixelbones :is(.input, .em-input-field, .em-datepicker, p.em-timezone,
       .em-input-upload, .event-categories) > label:not(.inline):not(.em-checkbox-icon):not(.em-date-input) {
  display: block;
  margin: 0 0 .4rem;
}

.css-event-form form.em.pixelbones fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }

/* "Times", "Recurrences Between" – the wrong-font, wrong-size labels */
.css-event-form form.em.pixelbones legend {
  display: block;
  width: 100%;
  margin: 0 0 .6rem;
  padding: 0;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--g-dark);
}
/* duplicate "Timerange" caption: keep for screen readers, hide visually */
.css-event-form form.em.pixelbones fieldset.em-timerange > legend {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.css-event-form form.em.pixelbones label i { font-style: normal; color: var(--g); }   /* required * */

/* help text: Event Name hint, location tip, notes */
.css-event-form form.em.pixelbones .event-form-name .input { font-size: .85rem; color: var(--muted); }
.css-event-form form.em.pixelbones :is(#em-location-search-tip, #em-location-reset, .multi-day-event-info,
       .em-recurrence-advanced-description-primary, .recurring-summary-missing) {
  display: block;
  margin: .5rem 0 0;
  font-size: .85rem;
  font-style: normal;
  line-height: 1.5;
  color: var(--muted);
}
.css-event-form form.em.pixelbones .em-recurrence-type > p:has(> strong:empty) { display: none; }
.css-event-form form.em.pixelbones .em-recurrence-type > p > strong { font-size: .95rem; color: var(--muted); }

/* ---------- 3. Fields ---------- */
.css-event-form form.em.pixelbones :is(.em-input-field, .em-location-data .input, .em-timezone,
       .em-datepicker, .event-categories, .em-input-upload) { margin: 0 0 1.35rem; }

.css-event-form form.em.pixelbones input:is([type="text"], [type="email"], [type="url"], [type="number"],
            [type="date"], [type="time"]),
.css-event-form form.em.pixelbones select,
.css-event-form form.em.pixelbones textarea {
  box-sizing: border-box;
  max-width: 100%;
  min-height: 46px;
  padding: .55rem .85rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background-color: #fff;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.css-event-form form.em.pixelbones :is(#event-name, #location-name, #location-address, #location-town, #location-state,
       #location-postcode, #location-region, #location-url, #event_location_url,
       #event_location_url_text, .em-timezone select, .em-input-field select,
       #location-country) { width: 100%; }

.css-event-form form.em.pixelbones :is(input, select, textarea):focus,
.css-event-form form.em.pixelbones :is(button, a):focus-visible {
  outline: none;
  border-color: var(--g);
  box-shadow: 0 0 0 3px rgba(79, 111, 82, .2);
}

.css-event-form form.em.pixelbones input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--g); }
.css-event-form form.em.pixelbones select[multiple] { min-height: 0; padding: .35rem; }
.css-event-form form.em.pixelbones select[multiple] option:checked { background: var(--g); color: #fff; }
.css-event-form form.em.pixelbones .event-categories select { width: 100%; max-width: 28rem; }

/* selectize (the plugin's enhanced dropdowns) */
.css-event-form form.em.pixelbones .selectize-control { width: 100%; }
.css-event-form form.em.pixelbones .selectize-input {
  min-height: 46px; padding: .55rem .85rem;
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: none;
}
.css-event-form form.em.pixelbones .selectize-input.focus { border-color: var(--g); box-shadow: 0 0 0 3px rgba(79,111,82,.2); }

/* "This is a [Single] event." */
.css-event-form form.em.pixelbones p.em-event-type { margin: 0 0 1.5rem; }
.css-event-form form.em.pixelbones p.em-event-type select { width: auto; min-width: 8rem; margin: 0 .25rem; }

/* date ranges */
.css-event-form form.em.pixelbones .em-datepicker-data { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.css-event-form form.em.pixelbones .em-datepicker-data .separator { color: var(--muted); }
.css-event-form form.em.pixelbones .em-datepicker-data input[type="date"] { width: auto; min-width: 10.5rem; }

/* ---------- 4. Times panel ---------- */
.css-event-form form.em.pixelbones .em-timeranges-editor {
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--tint);
}
.css-event-form form.em.pixelbones fieldset.em-timerange {                  /* one time slot */
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
}
.css-event-form form.em.pixelbones .em-timerange-inputs {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
}
.css-event-form form.em.pixelbones .em-timerange-inputs input.em-time-input { width: 7.5rem; min-width: 0; text-align: center; }

/* Duration / Buffer / Frequency: label | number | unit on one line */
.css-event-form form.em.pixelbones .em-timerange-timeslots { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.css-event-form form.em.pixelbones .em-timerange-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(4rem, 8rem) minmax(7rem, 10rem);
  align-items: center; gap: .6rem; margin: 0 0 .75rem;
}
.css-event-form form.em.pixelbones .em-timerange-row label { margin: 0; }
.css-event-form form.em.pixelbones .em-timerange-row input,
.css-event-form form.em.pixelbones .em-timerange-row select { width: 100%; }

.css-event-form form.em.pixelbones .em-timeranges-actions { margin-top: .5rem; }

/* ---------- 5. Recurrences ---------- */
.css-event-form form.em.pixelbones .em-recurrence-type { margin: 0 0 1.5rem; }
.css-event-form form.em.pixelbones .em-recurrence-set {
  margin: 0 0 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.css-event-form form.em.pixelbones .em-recurrence-set-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  margin: 0 0 1rem; padding: 0 0 .75rem; border-bottom: 1px solid var(--line);
}
.css-event-form form.em.pixelbones .em-recurrence-pattern {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .75rem;
  margin: 0 0 1rem;
}
.css-event-form form.em.pixelbones .em-recurrence-pattern select { width: auto; min-width: 7rem; }
.css-event-form form.em.pixelbones .em-recurrence-pattern input.em-recurrence-interval { width: 4.5rem; text-align: center; }
.css-event-form form.em.pixelbones .em-recurrence-pattern .alternate-selector { align-items: center; gap: .6rem; }

/* "Jan-01-1970 – Jan-01-1970 @ …" summary */
.css-event-form form.em.pixelbones .advanced-summary {
  margin: 0 0 1.25rem; padding: .7rem .9rem;
  border-left: 3px solid var(--g); background: var(--tint);
  font-size: .9rem; color: var(--text);
}

/* advanced options inside a recurrence */
.css-event-form form.em.pixelbones .em-recurrence-advanced > :is(.em-recurrence-duration, .em-recurrence-dates,
                                 fieldset.em-recurrence-timeranges, .em-timezone,
                                 .em-recurrence-status) { margin: 0 0 1.5rem; }
.css-event-form form.em.pixelbones .em-recurrence-duration { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.css-event-form form.em.pixelbones .em-recurrence-duration label { margin: 0; }
.css-event-form form.em.pixelbones .em-recurrence-duration input { width: 5rem; text-align: center; }
.css-event-form form.em.pixelbones fieldset.em-recurrence-timeranges {
  padding: 1.1rem 1.25rem; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--tint);
}
.css-event-form form.em.pixelbones .recurrence-timeranges-default { margin: 0 0 1rem; }
.css-event-form form.em.pixelbones .recurrence-timeranges-default label { font-weight: 500; }
.css-event-form form.em.pixelbones fieldset.em-recurrence-timeranges .em-timeranges-editor { padding: 0; border: 0; background: transparent; }
.css-event-form form.em.pixelbones fieldset.em-recurrence-timeranges legend { margin-bottom: .75rem; }

/* summary for "recurring" event type */
.css-event-form form.em.pixelbones .em-recurring-summary { margin: 1rem 0 0; }

/* ---------- 6. Buttons ---------- */
.css-event-form form.em.pixelbones :is(.button-secondary, .em-timerange-add) {
  min-height: 44px; padding: .55rem 1.1rem;
  border: 1px solid var(--g); border-radius: var(--r);
  background: #fff; color: var(--g-dark);
  font-family: inherit; font-size: .8rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
}
.css-event-form form.em.pixelbones :is(.button-secondary, .em-timerange-add):hover { background: var(--tint); color: var(--g-dark); }

.css-event-form form.em.pixelbones .em-add-recurrence-set {
  margin: 0 .5rem .5rem 0; padding: .6rem 1rem;
  border: 1px dashed var(--g); border-radius: var(--r);
  background: transparent; color: var(--g-dark);
  font-family: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.css-event-form form.em.pixelbones .em-add-recurrence-set:hover { background: var(--tint); }

.css-event-form form.em.pixelbones input[type="submit"].button-primary {
  min-height: 48px; padding: .75rem 2rem;
  border: 0; border-radius: var(--r);
  background: var(--g); color: #fff;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
.css-event-form form.em.pixelbones input[type="submit"].button-primary:hover { background: var(--g-dark); }

/* ---------- 7. Details, image, consent ---------- */
.css-event-form form.em.pixelbones .wp-editor-wrap { max-width: 100%; }
.css-event-form form.em.pixelbones input[type="file"] { max-width: 100%; font-size: .95rem; }
.css-event-form form.em.pixelbones input[type="file"]::file-selector-button {
  margin-right: .75rem; padding: .5rem 1rem;
  border: 1px solid var(--g); border-radius: var(--r);
  background: #fff; color: var(--g-dark); font-family: inherit; font-weight: 600; cursor: pointer;
}
.css-event-form form.em.pixelbones .em-input-upload-files-tbd { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .85rem; color: var(--muted); }
.css-event-form form.em.pixelbones .em-consent-checkbox { margin: 0 0 1.5rem; }
.css-event-form form.em.pixelbones .em-consent-checkbox label { font-weight: 500; line-height: 1.5; }
.css-event-form form.em.pixelbones .event-form-submit { margin-bottom: 0; }

/* ---------- 8. Mobile ---------- */
@media (max-width: 640px) {
  .css-event-form form.em.pixelbones :is(h3, h4) { font-size: 1.35rem; }
  .css-event-form form.em.pixelbones section[class*="event-form-"] { margin-bottom: 2.25rem; }

  /* 16px stops iPhones zooming into a field on tap */
  .css-event-form form.em.pixelbones input:is([type="text"], [type="email"], [type="url"], [type="number"],
              [type="date"], [type="time"]),
  .css-event-form form.em.pixelbones select, .css-event-form form.em.pixelbones textarea, .css-event-form form.em.pixelbones .selectize-input { font-size: 16px; }

  .css-event-form form.em.pixelbones .em-datepicker-data input[type="date"] { flex: 1 1 9rem; min-width: 0; }
  .css-event-form form.em.pixelbones .em-timeranges-editor,
  .css-event-form form.em.pixelbones fieldset.em-recurrence-timeranges { padding: .9rem; }
  .css-event-form form.em.pixelbones fieldset.em-timerange,
  .css-event-form form.em.pixelbones .em-recurrence-set { padding: .9rem; }

  .css-event-form form.em.pixelbones .em-timerange-row { grid-template-columns: 5.5rem 1fr 1fr; }
  .css-event-form form.em.pixelbones .em-timerange-inputs input.em-time-input { width: 6.5rem; }

  /* pattern controls stack full width */
  .css-event-form form.em.pixelbones .em-recurrence-pattern { flex-direction: column; align-items: stretch; }
  .css-event-form form.em.pixelbones .em-recurrence-pattern select,
  .css-event-form form.em.pixelbones .em-recurrence-pattern input.em-recurrence-interval { width: 100%; text-align: left; }

  .css-event-form form.em.pixelbones :is(.button-secondary, .em-timerange-add, .em-add-recurrence-set),
  .css-event-form form.em.pixelbones input[type="submit"].button-primary { width: 100%; margin-right: 0; }
}

/* =========================================================
   9. OPTIONAL: tidy-ups for the recurrence row
   In your screenshots every option's wording showed at once
   ("every day days week on weeks on month on the …") and the
   Duration/Buffer/Frequency fields were always open. These
   rules show only what matches the dropdown choice. If the row
   already behaves on the live page, delete this whole section.
   ========================================================= */
.css-event-form form.em.pixelbones .em-recurrence-pattern :is(.interval-desc, .alternate-selector) { display: none; }

.css-event-form form.em.pixelbones .em-recurrence-pattern:has(.recurrence_freq option[value="daily"]:checked)   .interval-daily-plural,
.css-event-form form.em.pixelbones .em-recurrence-pattern:has(.recurrence_freq option[value="weekly"]:checked)  .interval-weekly-plural,
.css-event-form form.em.pixelbones .em-recurrence-pattern:has(.recurrence_freq option[value="monthly"]:checked) .interval-monthly-plural,
.css-event-form form.em.pixelbones .em-recurrence-pattern:has(.recurrence_freq option[value="yearly"]:checked)  .interval-yearly-plural { display: inline; }

.css-event-form form.em.pixelbones .em-recurrence-pattern:has(.recurrence_freq option[value="weekly"]:checked)  label.em-weekly-selector { display: block; min-width: 12rem; }
.css-event-form form.em.pixelbones .em-recurrence-pattern:has(.recurrence_freq option[value="monthly"]:checked) span.em-monthly-selector:not(.em-weekly-selector) { display: inline-flex; flex-wrap: wrap; }
.css-event-form form.em.pixelbones .em-recurrence-pattern:not(:has(.recurrence_freq option[value="on"]:checked)) span.em-daily-selector { display: inline; }
.css-event-form form.em.pixelbones .em-recurrence-pattern:has(.recurrence_freq option[value="on"]:checked) .em-on-selector { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.css-event-form form.em.pixelbones .em-recurrence-pattern:has(.recurrence_freq option[value="on"]:checked) :is(.interval-desc-intro, input.em-recurrence-interval) { display: none; }

.css-event-form form.em.pixelbones fieldset.em-timerange:not(:has(.em-timerange-timeslots-trigger input:checked)) .em-timerange-timeslots { display: none; }
