/**
 * MBA Gallery Pro – Subcategory Pills
 *
 * Pill-style buttons that appear below the main category carousel
 * when a parent category with children is selected.
 *
 * @package MBA_Gallery_Pro
 */

/* ── Container ──────────────────────────────────────────────────── */
.medbeafgallery-child-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0 16px;
    margin: 0 0 8px;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e5e7eb;
}

/* Entry animation */
.medbeafgallery-child-categories.mba-pro-pills-enter {
    animation: mbaProPillsFadeIn 0.25s ease-out;
}

@keyframes mbaProPillsFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Individual pill ────────────────────────────────────────────── */
.mba-pro-subcategory-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    border: 1px solid #d1d5db;
    border-radius: 9999px; /* fully rounded */
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.mba-pro-subcategory-pill:hover {
    background: var(--medbeafgallery-primary-10, #eff6ff);
    border-color: var(--medbeafgallery-primary-50, #93c5fd);
    color: var(--medbeafgallery-primary-solid, #1d4ed8);
}

.mba-pro-subcategory-pill:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Active / selected state */
.mba-pro-subcategory-pill.active {
    background: var(--medbeafgallery-primary-solid, #2563eb);
    border-color: var(--medbeafgallery-primary-solid, #2563eb);
    color: #ffffff;
    box-shadow: 0 1px 3px var(--medbeafgallery-primary-20, rgba(37, 99, 235, 0.3));
}

.mba-pro-subcategory-pill.active:hover {
    background: var(--medbeafgallery-primary-solid, #1d4ed8);
    border-color: var(--medbeafgallery-primary-solid, #1d4ed8);
    color: #ffffff;
    filter: brightness(0.9);
}

/* Count badge inside pill */
.mba-pro-pill-count {
    font-weight: 400;
    opacity: 0.7;
    font-size: 12px;
}

.mba-pro-subcategory-pill.active .mba-pro-pill-count {
    opacity: 0.85;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .medbeafgallery-child-categories {
        padding: 10px 0 12px;
        gap: 6px;
    }

    .mba-pro-subcategory-pill {
        padding: 5px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .medbeafgallery-child-categories {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        scrollbar-width: none; /* Firefox */
    }

    .medbeafgallery-child-categories::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
}

/* ── Pro Case Description in Modal ──────────────────────────────── */
#medbeafgallery-case-description.medbeafgallery-case-description {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    padding: 20px 24px;
    margin: 0;
    background: rgba(0, 0, 0, 0.80);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 14px;
    line-height: 1.7;
    color: #e2e8f0;
    max-height: 35%;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

/* Hide when empty */
#medbeafgallery-case-description.medbeafgallery-case-description:empty {
    display: none !important;
}

.medbeafgallery-case-description::-webkit-scrollbar {
    width: 5px;
}

.medbeafgallery-case-description::-webkit-scrollbar-track {
    background: transparent;
}

.medbeafgallery-case-description::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

/* Typography inside description */
.medbeafgallery-case-description h2,
.medbeafgallery-case-description h3,
.medbeafgallery-case-description h4 {
    margin: 0 0 8px;
    color: #ffffff;
    font-weight: 600;
}

.medbeafgallery-case-description h2 {
    font-size: 18px;
}

.medbeafgallery-case-description h3 {
    font-size: 16px;
}

.medbeafgallery-case-description h4 {
    font-size: 15px;
}

.medbeafgallery-case-description p {
    margin: 0 0 12px;
}

.medbeafgallery-case-description p:last-child {
    margin-bottom: 0;
}

.medbeafgallery-case-description ul,
.medbeafgallery-case-description ol {
    margin: 0 0 12px;
    padding-left: 20px;
}

.medbeafgallery-case-description li {
    margin-bottom: 4px;
}

.medbeafgallery-case-description a {
    color: #93c5fd;
    text-decoration: underline;
}

.medbeafgallery-case-description a:hover {
    color: #bfdbfe;
}

.medbeafgallery-case-description strong {
    color: #ffffff;
    font-weight: 600;
}

.medbeafgallery-case-description blockquote {
    margin: 0 0 12px;
    padding: 10px 16px;
    border-left: 3px solid #60a5fa;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #cbd5e1;
}

/* Responsive */
@media (max-width: 768px) {
    .medbeafgallery-case-description {
        position: relative;
        max-height: 150px;
        padding: 14px 16px;
        font-size: 13px;
    }
}
