/*
 * EducationalEngine Store Display: EDD Products block tiles, pills and tile note.
 * Moved here from the theme's Additional CSS (1.1.0) so a theme or
 * Customizer change can't remove it. Anything in Additional CSS still
 * loads after this file and wins, so site-level tweaks keep working.
 */
.edd-blocks__downloads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 300px));
    gap: 24px;
    justify-content: start;
}

.edd-blocks__download {
    position: relative; /* anchors the pills */
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 24px;
    text-align: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.edd-blocks__download:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.edd-blocks__download-header {
    margin-bottom: 12px;
}

/* Leave room for the pill above the title */
.edd-blocks__download:has(.ee-pills) .edd-blocks__download-header {
    padding-top: 28px;
}

.edd-blocks__download-image-link {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
}

.edd-blocks__download-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edd-blocks__download-header h3 {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    font-size: 1.2rem;
}

.edd-blocks__download-header h3 a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 700;
}

.edd-blocks__download-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 16px;
}

.edd-blocks__download-price {
    margin-bottom: 16px;
}

.edd-blocks__download-price .edd_price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* Purchase / Checkout buttons: full tile width, taller.
   (.edd-no-js is EDD's hidden no-JavaScript fallback button; the
   Checkout link stays hidden by EDD's inline style until an item is
   added to the cart.) */
.edd-blocks__download .edd-blocks__download-footer .edd_download_purchase_form,
.edd-blocks__download .edd-blocks__download-footer .edd_purchase_submit_wrapper {
    display: block;
    width: 100%;
    margin: 0;
}

.edd-blocks__download .edd-blocks__download-footer .edd-add-to-cart:not(.edd-no-js),
.edd-blocks__download .edd-blocks__download-footer .edd_go_to_checkout {
    display: block;
    width: 100%;
    background: #2e6da4;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.edd-blocks__download .edd-blocks__download-footer .edd-add-to-cart:not(.edd-no-js):hover,
.edd-blocks__download .edd-blocks__download-footer .edd-add-to-cart:not(.edd-no-js):focus,
.edd-blocks__download .edd-blocks__download-footer .edd_go_to_checkout:hover,
.edd-blocks__download .edd-blocks__download-footer .edd_go_to_checkout:focus {
    color: #fff;
    background: #23517a;
}

/* Pills — Download Tags shown top-right of the tile */
.edd-blocks__download .ee-pills {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    margin: 0;
    z-index: 1;
}

.edd-blocks__download .ee-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: #e6eef6;
    color: #1e5a8a;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Duration pills — colour picked automatically from the tag's length */
.edd-blocks__download .ee-pill--dur-short   { background: #fdecc8; color: #8a4b00; } /* up to 1 month */
.edd-blocks__download .ee-pill--dur-quarter { background: #d9f2ee; color: #0f6b5c; } /* up to 3 months */
.edd-blocks__download .ee-pill--dur-half    { background: #e6eef6; color: #1e5a8a; } /* up to 6 months */
.edd-blocks__download .ee-pill--dur-year    { background: #e3f4e1; color: #2d6a27; } /* up to 12 months */
.edd-blocks__download .ee-pill--dur-long    { background: #ece6f8; color: #5b3a9e; } /* over 12 months / lifetime */

/* Highlighted pill (Download Tag "Best value") — always wins */
.edd-blocks__download .ee-pill.ee-pill--best-value {
    background: #1e5a8a;
    color: #fff;
}

/* Tile note above the price */
.edd-blocks__download .ee-pack-note {
    font-style: italic;
    color: #5a6b7d;
    margin: 0 0 12px;
}
