/**
 * HHCC Connectory Display — public styles.
 *
 * Mirrors the Laravel public design language: HHCC navy (#1a3a6b) accent,
 * rounded-2xl card system, generous whitespace, soft shadows, lime check
 * marks for success. All selectors are scoped under `.hhcc-connectory` so
 * the plugin never bleeds onto the WordPress theme.
 */

.hhcc-connectory {
    /* Design tokens */
    --hhcc-accent: #1a3a6b;
    --hhcc-accent-soft: rgba(26, 58, 107, 0.08);
    --hhcc-accent-ring: rgba(26, 58, 107, 0.15);
    --hhcc-blue: #2b5ea7;
    --hhcc-gradient: linear-gradient(135deg, #1a3a6b 0%, #2b5ea7 100%);
    --hhcc-white: #ffffff;
    --hhcc-zinc-50:  #fafafa;
    --hhcc-zinc-100: #f5f5f5;
    --hhcc-zinc-200: #e5e5e5;
    --hhcc-zinc-300: #d4d4d4;
    --hhcc-zinc-400: #a3a3a3;
    --hhcc-zinc-500: #737373;
    --hhcc-zinc-600: #525252;
    --hhcc-zinc-700: #404040;
    --hhcc-zinc-800: #262626;
    --hhcc-zinc-900: #171717;
    --hhcc-amber-100: #fef3c7;
    --hhcc-amber-400: #fbbf24;
    --hhcc-amber-900: #78350f;
    --hhcc-lime-100: #ecfccb;
    --hhcc-lime-400: #84cc16;
    --hhcc-lime-600: #65a30d;
    --hhcc-lime-900: #365314;
    --hhcc-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --hhcc-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --hhcc-shadow-md: 0 6px 24px rgba(15, 23, 42, 0.08);
    --hhcc-shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.12);

    color: var(--hhcc-zinc-700);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

.hhcc-connectory *,
.hhcc-connectory *::before,
.hhcc-connectory *::after {
    box-sizing: border-box;
}

.hhcc-connectory img {
    max-width: 100%;
    height: auto;
}

/* ── Fallback / empty state ──────────────────────────────────────────── */
.hhcc-connectory--fallback {
    padding: 1.75rem;
    border: 1px dashed var(--hhcc-zinc-200);
    border-radius: 1rem;
    background: var(--hhcc-zinc-50);
    color: var(--hhcc-zinc-500);
    text-align: center;
    font-size: 0.9rem;
}

/* ── Section header (above any shortcode block) ──────────────────────── */
.hhcc-section-header {
    text-align: center;
    margin: 0 0 1.5rem;
}
.hhcc-section-header__eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--hhcc-accent);
    margin-bottom: 0.5rem;
}
.hhcc-section-header__title {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--hhcc-zinc-900);
    letter-spacing: -0.01em;
    margin: 0;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.hhcc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1rem;
    min-height: 42px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 0.625rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    box-shadow: var(--hhcc-shadow-sm);
}
.hhcc-btn--primary {
    background: var(--hhcc-accent);
    color: var(--hhcc-white);
}
.hhcc-btn--primary:hover { background: #142d54; color: var(--hhcc-white); }
.hhcc-btn--ghost {
    background: var(--hhcc-white);
    color: var(--hhcc-accent);
    border-color: var(--hhcc-accent);
}
.hhcc-btn--ghost:hover { background: var(--hhcc-accent-soft); }
.hhcc-btn--soft {
    background: var(--hhcc-zinc-100);
    color: var(--hhcc-zinc-700);
    box-shadow: none;
}
.hhcc-btn--soft:hover { background: var(--hhcc-zinc-200); }
.hhcc-btn--block { width: 100%; }

/* ── Carousel (logo strips) ──────────────────────────────────────────── */
.hhcc-logo-strip {
    margin: 2rem 0;
}
.hhcc-logo-strip__heading {
    font-size: clamp(1.4rem, 2.4vw, 1.875rem);
    font-weight: 700;
    color: var(--hhcc-zinc-900);
    text-align: center;
    letter-spacing: -0.01em;
    margin: 0 0 1.5rem;
}
.hhcc-carousel {
    position: relative;
    overflow: hidden;
}
.hhcc-carousel__viewport {
    overflow: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.hhcc-carousel__viewport::-webkit-scrollbar { display: none; }
.hhcc-carousel__track {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
.hhcc-carousel__slide {
    flex: 0 0 calc((100% - (var(--per-view, 1) - 1) * 1rem) / var(--per-view, 1));
    display: flex;
    align-items: center;
    justify-content: center;
}
.hhcc-logo-card {
    width: 100%;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: var(--hhcc-white);
    border: 1px solid var(--hhcc-zinc-200);
    border-radius: 1rem;
    box-shadow: var(--hhcc-shadow-xs);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.hhcc-logo-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hhcc-shadow-md);
    border-color: var(--hhcc-accent-ring);
}
.hhcc-logo-card__link { display: contents; }
.hhcc-logo-card__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(0.18);
    transition: filter 0.2s ease;
}
.hhcc-logo-card:hover .hhcc-logo-card__img { filter: none; }

.hhcc-carousel__control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hhcc-white);
    border: 1px solid var(--hhcc-zinc-200);
    border-radius: 999px;
    box-shadow: var(--hhcc-shadow-md);
    color: var(--hhcc-zinc-700);
    cursor: pointer;
    z-index: 2;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.hhcc-carousel__control:hover {
    background: var(--hhcc-accent);
    color: var(--hhcc-white);
    border-color: var(--hhcc-accent);
}
.hhcc-carousel__control:disabled,
.hhcc-carousel__control[aria-disabled="true"] {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}
.hhcc-carousel__control--prev { left: -8px; }
.hhcc-carousel__control--next { right: -8px; }
.hhcc-carousel__control svg { width: 18px; height: 18px; }

@media (min-width: 768px) {
    .hhcc-carousel__control--prev { left: -20px; }
    .hhcc-carousel__control--next { right: -20px; }
}

@media (prefers-reduced-motion: reduce) {
    .hhcc-carousel__track { transition: none; }
    .hhcc-carousel__viewport { scroll-behavior: auto; }
}

/* ── Listings — filters + grid ───────────────────────────────────────── */
.hhcc-listings { margin: 1.5rem 0; }
.hhcc-listings__filters {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: var(--hhcc-white);
    border: 1px solid var(--hhcc-zinc-200);
    border-radius: 1rem;
    box-shadow: var(--hhcc-shadow-xs);
}
@media (min-width: 640px) {
    .hhcc-listings__filters {
        grid-template-columns: 1fr 220px auto auto;
        align-items: center;
        padding: 1rem 1.25rem;
    }
}
.hhcc-listings__filters input[type="search"],
.hhcc-listings__filters select {
    width: 100%;
    height: 42px;
    padding: 0 0.85rem;
    font-size: 0.9rem;
    color: var(--hhcc-zinc-900);
    background: var(--hhcc-white);
    border: 1px solid var(--hhcc-zinc-200);
    border-radius: 0.625rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
}
.hhcc-listings__filters select {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 24 24" stroke="%23737373" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}
.hhcc-listings__filters input[type="search"]:focus,
.hhcc-listings__filters select:focus {
    outline: none;
    border-color: var(--hhcc-accent);
    box-shadow: 0 0 0 3px var(--hhcc-accent-ring);
}

.hhcc-listings__grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 640px)  { .hhcc-listings__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .hhcc-listings__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.hhcc-listings__card {
    background: var(--hhcc-white);
    border: 1px solid var(--hhcc-zinc-200);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: var(--hhcc-shadow-xs);
}
.hhcc-listings__card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hhcc-shadow-md);
    border-color: var(--hhcc-accent-ring);
}
.hhcc-listings__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--hhcc-zinc-100);
}
.hhcc-listings__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.hhcc-listings__card:hover .hhcc-listings__media img { transform: scale(1.04); }
.hhcc-listings__badges {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}
.hhcc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.4;
    box-shadow: var(--hhcc-shadow-xs);
}
.hhcc-badge--pc      { background: var(--hhcc-amber-100); color: var(--hhcc-amber-900); }
.hhcc-badge--partner { background: var(--hhcc-lime-100); color: var(--hhcc-lime-900); }

.hhcc-listings__body {
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}
.hhcc-listings__category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--hhcc-accent);
}
.hhcc-listings__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--hhcc-zinc-900);
    line-height: 1.35;
    margin: 0;
}
.hhcc-listings__title a { color: inherit; text-decoration: none; }
.hhcc-listings__title a:hover { color: var(--hhcc-accent); }
.hhcc-listings__excerpt {
    font-size: 0.85rem;
    color: var(--hhcc-zinc-600);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.hhcc-listings__footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hhcc-zinc-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.hhcc-listings__view {
    color: var(--hhcc-accent);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.hhcc-listings__view:hover { text-decoration: underline; }

.hhcc-listings__count {
    font-size: 0.85rem;
    color: var(--hhcc-zinc-500);
    margin-bottom: 1rem;
}
.hhcc-listings__count strong { color: var(--hhcc-zinc-900); font-weight: 600; }

.hhcc-listings__pagination {
    margin-top: 1.75rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

/* ── Plans — cards ───────────────────────────────────────────────────── */
.hhcc-plans { margin: 1.5rem 0; }
.hhcc-plans--cards {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .hhcc-plans--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .hhcc-plans--cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.hhcc-plans__card {
    position: relative;
    padding: 1.75rem;
    background: var(--hhcc-white);
    border: 1px solid var(--hhcc-zinc-200);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--hhcc-shadow-xs);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hhcc-plans__card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hhcc-shadow-md);
}
.hhcc-plans__card--featured {
    border: 2px solid var(--hhcc-accent);
    box-shadow: 0 0 0 4px var(--hhcc-accent-ring), var(--hhcc-shadow-md);
}
.hhcc-plans__ribbon {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.3rem 0.85rem;
    background: var(--hhcc-gradient);
    color: var(--hhcc-white);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 999px;
    box-shadow: var(--hhcc-shadow-sm);
    white-space: nowrap;
}
.hhcc-plans__name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--hhcc-zinc-900);
    margin: 0;
    letter-spacing: -0.01em;
}
.hhcc-plans__price-block { display: flex; align-items: baseline; gap: 0.4rem; }
.hhcc-plans__price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--hhcc-zinc-900);
    letter-spacing: -0.02em;
    line-height: 1;
}
.hhcc-plans__cycle {
    font-size: 0.875rem;
    color: var(--hhcc-zinc-500);
    font-weight: 500;
}
.hhcc-plans__description {
    font-size: 0.875rem;
    color: var(--hhcc-zinc-600);
    margin: 0;
}
.hhcc-plans__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.hhcc-plans__features li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: var(--hhcc-zinc-700);
}
.hhcc-plans__features li::before {
    content: "";
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 999px;
    background: var(--hhcc-lime-100) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%2365a30d"><path fill-rule="evenodd" d="M16.704 5.29a1 1 0 0 1 .006 1.414l-7.07 7.143a1 1 0 0 1-1.42.006L3.29 8.93a1 1 0 0 1 1.41-1.42l3.218 3.196 6.36-6.43a1 1 0 0 1 1.426.014z" clip-rule="evenodd"/></svg>') center / 12px no-repeat;
}
.hhcc-plans__cta { margin-top: auto; }

/* ── Plans — comparison ──────────────────────────────────────────────── */
.hhcc-plans--comparison { margin-top: 1.5rem; }
.hhcc-plans__comparison-card {
    background: var(--hhcc-white);
    border: 1px solid var(--hhcc-zinc-200);
    border-radius: 1rem;
    box-shadow: var(--hhcc-shadow-xs);
    overflow: hidden;
}
.hhcc-plans__table {
    width: 100%;
    border-collapse: collapse;
}
.hhcc-plans__table thead {
    background: var(--hhcc-zinc-50);
}
.hhcc-plans__table th,
.hhcc-plans__table td {
    padding: 0.85rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--hhcc-zinc-100);
    font-size: 0.875rem;
    vertical-align: middle;
}
.hhcc-plans__table th { color: var(--hhcc-zinc-700); font-weight: 600; }
.hhcc-plans__table th:first-child,
.hhcc-plans__table td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--hhcc-zinc-700);
    background: var(--hhcc-zinc-50);
    width: 26%;
}

/* On mobile collapse the table into stacked cards */
@media (max-width: 639px) {
    .hhcc-plans__table,
    .hhcc-plans__table thead,
    .hhcc-plans__table tbody,
    .hhcc-plans__table tr,
    .hhcc-plans__table th,
    .hhcc-plans__table td {
        display: block;
        width: 100% !important;
        text-align: left !important;
        border: none;
    }
    .hhcc-plans__table thead { display: none; }
    .hhcc-plans__table tbody tr {
        padding: 1rem 0;
        border-bottom: 1px solid var(--hhcc-zinc-100);
    }
    .hhcc-plans__table tbody tr:last-child { border-bottom: none; }
    .hhcc-plans__table td {
        padding: 0.35rem 1rem;
        font-size: 0.875rem;
    }
    .hhcc-plans__table td::before {
        content: attr(data-label) " · ";
        font-weight: 600;
        color: var(--hhcc-zinc-500);
    }
    .hhcc-plans__table td:first-child {
        background: transparent;
        padding-top: 0;
        font-weight: 700;
        font-size: 1rem;
        color: var(--hhcc-zinc-900);
    }
    .hhcc-plans__table td:first-child::before { content: ""; }
}
