/*
 * Quantum Academy - The Events Calendar and Event Tickets colour overrides.
 *
 * Every value references the theme palette in style.css, with the palette's
 * current hex as fallback, so a palette change propagates here automatically.
 *
 * Verify variable names in DevTools after each plugin update. TEC renames
 * custom properties between releases, and a renamed variable fails silently.
 */

:root {
    --tec-color-background: var(--qa-white, #FFFFFF);
    --tec-color-background-events: var(--qa-white, #FFFFFF);
    --tec-color-background-secondary: var(--qa-surface, #F7F9FB);

    --tec-color-text-primary: var(--qa-ink, #14202E);
    --tec-color-text-secondary: var(--qa-slate, #5C6B7A);
    --tec-color-text-primary-light: var(--qa-mist, #8A95A1);
    --tec-color-text-event-title: var(--qa-navy, #0F2C4D);
    --tec-color-text-event-date: var(--qa-ink, #14202E);

    --tec-color-accent-primary: var(--qa-navy, #0F2C4D);
    --tec-color-accent-primary-hover: var(--qa-navy-mid, #2C4A6B);
    --tec-color-accent-primary-active: var(--qa-navy-dark, #0A1F38);
    --tec-color-accent-secondary: var(--qa-champagne-deep, #8A7330);

    --tec-color-link-primary: var(--qa-ink, #14202E);
    --tec-color-link-accent: var(--qa-champagne-deep, #8A7330);
    --tec-color-link-accent-hover: var(--qa-navy, #0F2C4D);

    --tec-color-button-primary: var(--qa-navy, #0F2C4D);
    --tec-color-button-primary-hover: var(--qa-navy-mid, #2C4A6B);
    --tec-color-button-primary-active: var(--qa-navy-dark, #0A1F38);
    --tec-color-button-secondary: var(--qa-navy-tint, #E8EDF3);

    --tec-color-border-default: var(--qa-hairline, #E3E8EE);
    --tec-color-border-secondary: var(--qa-hairline, #E3E8EE);
    --tec-color-border-active: var(--qa-navy, #0F2C4D);
}

/*
 * The one primary call to action carries the champagne, with navy text.
 * Both properties are set together so neither can be inherited away.
 */
.tribe-tickets__tickets-buy,
.tribe-tickets__commerce-checkout-form-submit-button,
.tribe-common .tribe-common-c-btn--tickets {
    background-color: var(--qa-champagne, #D8C189);
    border-color: var(--qa-champagne, #D8C189);
    color: var(--qa-navy, #0F2C4D);
    font-weight: 600;
}

.tribe-tickets__tickets-buy:hover,
.tribe-tickets__commerce-checkout-form-submit-button:hover,
.tribe-common .tribe-common-c-btn--tickets:hover {
    background-color: var(--qa-champagne-deep, #8A7330);
    border-color: var(--qa-champagne-deep, #8A7330);
    color: var(--qa-white, #FFFFFF);
}

.tribe-tickets__tickets-item-quantity-unavailable {
    color: var(--qa-slate, #5C6B7A);
}

/* ---------------------------------------------------------------------------
   Booking cards on single course pages.

   The card renders a TEC list view inside a narrow column, where the default
   featured image is far too large. Scoped to .qa-book-body, the theme's own
   wrapper around the shortcode output, so the full-width /schedule/ listing
   keeps its original image size.

   Note: this scales the image down for display only. The browser still
   downloads the full-size file, so a card showing six events pulls six of
   them. Reducing the bytes as well means changing the size TEC requests,
   which is a template-level change rather than CSS.
   --------------------------------------------------------------------------- */

.qa-book-body .tribe-events-calendar-list__event-featured-image {
    flex: 0 0 110px;
    max-width: 110px;
}

.qa-book-body .tribe-events-calendar-list__event-featured-image img {
    width: 100%;
    height: 74px;
    object-fit: cover;
}
