/* =============================================================================
   Region Manager — region-manager.css
   Replaces all inline styles previously injected from PHP.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Flag selector (F2)
   ----------------------------------------------------------------------------- */
.dtc-rg-flag-selector img.dtc-rg-flag {
  width: auto;
  height: 26px;
}
.dtc-rg-flag-selector {
    position: relative;
    padding: 0;
    border: 0;
    margin-top: 16px;
    margin-left: 12px;
}

.dtc-rg-flag-selector__toggle {
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.dtc-rg-flag-selector__toggle:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.dtc-rg-flag-selector .dtc-rg-flag-selector__label {
    line-height: 24px;
}

.dtc-rg-flag-selector .dtc-rg-flag-selector__flag {
    display: block;
    height: 24px;
    width: auto;
}

/* Dropdown panel */
.dtc-rg-flag-selector__picker {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    width: 240px;
}

.dtc-rg-picker-inner {
    display: flex;
    flex-direction: column;
}

.dtc-rg-picker-search {
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid #eee;
    border-radius: 4px 4px 0 0;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
}

.dtc-rg-picker-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}

.dtc-rg-picker-list li {
    padding: 0;
}

.dtc-rg-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
}

.dtc-rg-picker-item:hover {
    background: #f5f5f5;
    color: #111;
    text-decoration: none;
}

.dtc-rg-picker-current .dtc-rg-picker-item {
    background: #f0f8ff;
    font-weight: 600;
}

/* -----------------------------------------------------------------------------
   Patient-resources category — 6-column portrait grid (F5)
   ----------------------------------------------------------------------------- */

/* Portrait aspect ratio for card images */
.dtc-rg-patient-resources .card.card-md:not(.card-webinar) .card-img-container .card-img-aspect,
.dtc-rg-patient-resources .woocommerce ul.products li.card.product:not(.card-webinar) .card-img-container .card-img-aspect,
.dtc-rg-patient-resources .woocommerce-page ul.products li.card.product:not(.card-webinar) .card-img-container .card-img-aspect {
    padding-top: 141.67%;
}

/* Desktop: 6-column grid */
@media (min-width: 992px) {
    .dtc-rg-patient-resources .fl-module-post-grid-cards .fl-post-cards > .card,
    .dtc-rg-patient-resources .post-container > .card,
    .dtc-rg-patient-resources .woocommerce ul.products > .card,
    .dtc-rg-patient-resources .woocommerce-page ul.products > .card {
        -ms-flex-preferred-size: calc(100% / 6 - 20px);
        flex-basis: calc(100% / 6 - 20px);
        width: calc(100% / 6 - 20px);
    }
}

/* Tablet: 3-column grid */
@media (min-width: 600px) and (max-width: 991px) {
    .dtc-rg-patient-resources .fl-module-post-grid-cards .fl-post-cards > .card,
    .dtc-rg-patient-resources .post-container > .card,
    .dtc-rg-patient-resources .woocommerce ul.products > .card,
    .dtc-rg-patient-resources .woocommerce-page ul.products > .card {
        -ms-flex-preferred-size: calc(100% / 3 - 20px);
        flex-basis: calc(100% / 3 - 20px);
        width: calc(100% / 3 - 20px);
    }
}

/* Mobile: 2-column grid */
@media (max-width: 599px) {
    .dtc-rg-patient-resources .fl-module-post-grid-cards .fl-post-cards > .card,
    .dtc-rg-patient-resources .post-container > .card,
    .dtc-rg-patient-resources .woocommerce ul.products > .card,
    .dtc-rg-patient-resources .woocommerce-page ul.products > .card {
        -ms-flex-preferred-size: calc(50% - 20px);
        flex-basis: calc(50% - 20px);
        width: calc(50% - 20px);
    }

    .dtc-rg-patient-resources .card.card-md:not(.card-webinar) .card-img-container,
    .dtc-rg-patient-resources .woocommerce ul.products li.card.product:not(.card-webinar) .card-img-container,
    .dtc-rg-patient-resources .woocommerce-page ul.products li.card.product:not(.card-webinar) .card-img-container {
        width: 100%;
        margin: 0 auto;
    }

    .dtc-rg-patient-resources .card-ribbon {
        right: 0;
    }
}

/* -----------------------------------------------------------------------------
   Product template 1 — Downloadable Resource portrait layout (F5)
   Previously injected inline from content-single-product.php
   ----------------------------------------------------------------------------- */

body.woocommerce.single-product main .type-product.product-template-1 {
    align-items: center;
    flex-direction: column;
    max-width: 520px;
}

body.woocommerce.single-product main .type-product.product-template-1 > .product-content-image {
    position: relative;
}

body.woocommerce.single-product main .type-product.product-template-1 > .summary {
    width: 100%;
    padding-right: 0;
    max-width: none;
}

body.woocommerce.single-product main .type-product.product-template-1 .product-content-tabs {
    padding-left: 0;
}

body.woocommerce.single-product main .type-product.product-template-1 .woocommerce div.product div.images img {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

/* -----------------------------------------------------------------------------
   Sponsor section (F6)
   ----------------------------------------------------------------------------- */

.dtc-rg-sponsor-section {
    margin-top: 1.5rem;
}

.dtc-rg-sponsor-text {
    font-style: italic;
}

.dtc-rg-supporter-logo {
    display: block;
    max-height: 60px;
    width: auto;
    margin-top: 0.5rem;
}

/* -----------------------------------------------------------------------------
   Past-webinar cards — hide the card-meta block (date is no longer relevant)
   ----------------------------------------------------------------------------- */

.card-webinar-past .card-block.card-meta {
    display: none;
}

/* -----------------------------------------------------------------------------
   Timezone picker (F10)
   ----------------------------------------------------------------------------- */

.dtc-rg-tz-picker {
    margin-top: 0.35rem;
}

/* "Choose Time Zone" trigger link */
.dtc-rg-tz-link {
    background: none;
    border: none;
    padding: 0;
    color: #01aeb8;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

.dtc-rg-tz-link:hover {
    color: #018a92;
}

.dtc-rg-tz-link:disabled {
    color: #888;
    cursor: default;
    text-decoration: none;
}

/* Country and timezone dropdowns rendered after JSON load */
.dtc-rg-country-select {
    font-size: 14px;
  padding: 2px;
  margin-right: 0.5rem;
  margin-top: 0.5rem;
}

.dtc-rg-timezone-select {
    font-size: 14px;
  padding: 2px;
  margin-top: 0.5rem;
}

p.dtc-webinar-grid-excerpt + p {
  display: none;
}

/* Override the theme's 44px height cap; use line-clamp for a clean ellipsis cutoff. */
.woocommerce .card.post-type-product p.dtc-webinar-grid-excerpt,
.woocommerce-page .card.post-type-product p.dtc-webinar-grid-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: none !important;
}

.woocommerce-error a.dtc-rg-multi-region-products-cart-link {
  color: #02a4ad;
}
