/*
 * MyMentorPal – Expert Card Stylesheet
 * Matches the visual language of app.hubble.social/finder
 * Version: 1.0.0
 */

/* =========================================================
   1. WP Grid Builder reset  (targeted, not blanket)
   ========================================================= */
.wpgb-grid-1 .wpgb-card {
    width: 100%;
    max-width: 100%;
    margin-bottom: 12px;
    float: none;
    clear: both;
    position: static;
    transform: none;
}

.wpgb-grid-1 .wpgb-card-wrapper,
.wpgb-grid-1 .wpgb-card-inner {
    display: block;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Hide WPGB's native SVG ratio-box and the default title block */
.wpgb-grid-1 .wpgb-card-media,
.wpgb-grid-1 svg[data-ratio] {
    display: none;
}

.wpgb-grid-1 .wpgb-card-body {
    padding: 0;
    margin: 0;
}

/* =========================================================
   2. Card shell
   ========================================================= */
.mmp-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 4%);
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    width: 100%;
    box-sizing: border-box;
}

.mmp-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 14px rgb(0 0 0 / 7%);
}

/* =========================================================
   3. Avatar
   ========================================================= */
.mmp-card__avatar {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    display: block;
}

/* =========================================================
   4. Body column
   ========================================================= */
.mmp-card__body {
    flex: 1;
    min-width: 0;
}

/* =========================================================
   5. Header row
   ========================================================= */
.mmp-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mmp-card__name-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.mmp-card__name {
    margin: 0;
    padding: 0;
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

/* Verified badge */
.mmp-badge--verified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3b82f6;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Rating */
.mmp-card__rating {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.mmp-card__star {
    color: #fbbf24;
}

/* Top Advisor badge */
.mmp-badge--top {
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 9999px;
    white-space: nowrap;
}

/* Heart / save button */
.mmp-card__heart {
    background: none;
    border: none;
    padding: 0;
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.mmp-card__heart:hover {
    color: #ef4444;
}

/* =========================================================
   6. Role line
   ========================================================= */
.mmp-card__role {
    margin: 4px 0 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.35;
}

/* =========================================================
   7. Specialty pills
   ========================================================= */
.mmp-card__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.mmp-card__pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 3px 10px;
    font-size: 12px;
    color: #374151;
    background: #ffffff;
    white-space: nowrap;
}

.mmp-card__pill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f3f4f6;
    font-size: 9px;
    color: #6b7280;
    flex-shrink: 0;
}

/* =========================================================
   8. Footer row
   ========================================================= */
.mmp-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.mmp-card__price-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mmp-card__price-line {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.mmp-card__price {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.mmp-card__price-unit {
    font-size: 12px;
    color: #6b7280;
}

.mmp-card__next-slot {
    margin: 0;
    font-size: 11.5px;
    color: #9ca3af;
}

.mmp-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* =========================================================
   9. Buttons
   ========================================================= */
.mmp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 9999px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.mmp-btn--outline {
    background: #ffffff;
    border: 1px solid #111827;
    color: #111827;
}

.mmp-btn--outline:hover {
    background: #f9fafb;
    color: #111827;
}

.mmp-btn--solid {
    background: #111827;
    border: 1px solid #111827;
    color: #ffffff;
}

.mmp-btn--solid:hover {
    background: #000000;
    border-color: #000000;
}

/* =========================================================
   10. Sidebar facet controls
   ========================================================= */
.wpgb-checkboxes input[type="checkbox"],
.wpgb-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wpgb-checkbox-label,
.wpgb-choice-label {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    font-size: 13px;
    color: #374151;
    background: #ffffff;
    cursor: pointer;
    margin: 2px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    user-select: none;
}

input:checked + .wpgb-checkbox-label,
input:checked + .wpgb-choice-label {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

/* Availability radio toggle group */
.wpgb-radio-list {
    display: flex;
    flex-direction: row;
    gap: 4px;
    padding: 3px;
    background: #f3f4f6;
    border-radius: 9999px;
}

.wpgb-radio-label {
    flex: 1;
    text-align: center;
    padding: 6px 10px;
    border-radius: 9999px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

input:checked + .wpgb-radio-label {
    background: #ffffff;
    color: #111827;
    font-weight: 600;
    box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
}

/* =========================================================
   11. Responsive: finder page layout
   ========================================================= */

/* The Elementor container wrapping [sidebar | grid] is set to
   calc(100% - 392px) width for the right panel via Elementor's
   own responsive settings. We only need to make sure the cards
   themselves are fluid on small screens. */

@media (max-width: 768px) {
    .mmp-card {
        flex-direction: column;
        padding: 16px;
        gap: 12px;
    }

    .mmp-card__avatar {
        width: 64px;
        height: 64px;
    }

    .mmp-card__footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .mmp-card__actions {
        width: 100%;
    }

    .mmp-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ==========================================================================
   4. Header Slider (Taxonomy terms)
   ========================================================================== */
.mmp-header-slider-nav {
    width: 100%;
    border-top: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
    background: #fff;
}

.mmp-header-slider-container {
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 16px !important;
}

.mmp-header-slider-btn {
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    color: #4b5563;
    transition: all 0.2s;
    z-index: 2;
}

.mmp-header-slider-btn:hover:not(:disabled) {
    background: #e5e7eb;
    color: #111827;
}

.mmp-header-slider-btn:disabled {
    opacity: 0;
    cursor: default;
    pointer-events: none;
}

.mmp-header-slider-list {
    display: flex !important;
    align-items: center !important;
    gap: 32px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 16px !important;
    overflow-x: auto !important;
    scroll-behavior: smooth !important;
    -ms-overflow-style: none !important;  /* IE and Edge */
    scrollbar-width: none !important;  /* Firefox */
}

.mmp-header-slider-list::-webkit-scrollbar {
    display: none;
}

.mmp-header-slider-item {
    flex-shrink: 0;
}

.mmp-header-slider-link {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #6b7280 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 16px 0 !important;
    border-bottom: 2px solid transparent !important;
    transition: all 0.2s !important;
    white-space: nowrap !important;
}

.mmp-header-slider-icon {
    display: inline-flex !important;
    align-items: center !important;
    color: currentColor !important;
}

.mmp-header-slider-link:hover {
    color: #111827 !important;
}

.mmp-header-slider-link.active {
    color: #111827 !important;
    font-weight: 700 !important;
    border-bottom-color: #111827 !important;
}
