/* ==========================================================================
   KH Profile Highlights — khph-frontend.css
   All rules scoped to .kh-profile-highlights — zero BuddyBoss interference.
   ========================================================================== */

/* ── Block wrapper ── */
.kh-profile-highlights {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 10px;
    margin-bottom: 8px;
    border: 1px solid rgba(0,0,0,0.09);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 6px solid top accent bar */
.kh-profile-highlights::before {
    content: '';
    display: block;
    height: 6px;
    background: #439bc0;
}

/* ── Top row: info left, meta right ── */
.khph-inner {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 16px 20px 14px;
}

/* ── Left: mission + pills ── */
.khph-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding-right: 20px;
}

.khph-section-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #888;
}

.khph-mission {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #555;
}

.khph-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.khph-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    background: #e8f4f9;
    color: #1a6e8e;
    border: 1px solid #b5d9ea;
    line-height: 1.4;
}

/* ── Vertical divider ── */
.khph-divider-v {
    width: 1px;
    background: #eee;
    flex-shrink: 0;
    align-self: stretch;
}

/* ── Right: location + website ── */
.khph-meta {
    flex-shrink: 0;
    width: 160px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    justify-content: center;
}

.khph-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
}

.khph-meta-item svg {
    opacity: 0.45;
    flex-shrink: 0;
}

.khph-link {
    color: #439bc0;
    text-decoration: none;
    font-size: 12px;
    word-break: break-all;
}

.khph-link:hover {
    text-decoration: underline;
}

/* ── Bottom button row ── */
.khph-btn-row {
    display: flex;
    gap: 8px;
    padding: 10px 16px 14px;
    border-top: 1px solid #eee;
}

.khph-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 6px;
    font-size: 12px;
    font-weight: 500;
    color: #439bc0;
    background: transparent;
    border: 1px solid #439bc0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
    font-family: inherit;
}

.khph-btn:hover {
    background: #f0f8fc;
}

.khph-btn.is-active {
    background: #439bc0;
    color: #fff;
}

.khph-btn-icon {
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
    color: currentColor;
}

/* Prevent BuddyBoss menu icon styles overriding button icon size */
.kh-profile-highlights .khph-btn-icon.bb-icon-l {
    font-size: 15px !important;
    min-width: auto !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
}

.khph-chevron {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    opacity: 0.75;
    transition: transform 0.2s ease;
}

.khph-btn.is-active .khph-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

/* ── Expandable panel ── */
.khph-panel {
    border-top: 1px solid #eee;
    padding: 14px 20px;
}

.khph-panel[hidden] {
    display: none;
}

.khph-panel-header {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin-bottom: 10px;
}

/* Loading state */
.khph-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
    padding: 6px 0;
}

.khph-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #ddd;
    border-top-color: #439bc0;
    border-radius: 50%;
    animation: khph-spin 0.6s linear infinite;
    flex-shrink: 0;
}

@keyframes khph-spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.khph-empty-state {
    padding: 20px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.khph-empty-msg {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    max-width: 320px;
}

.khph-empty-btn {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: #439bc0;
    border: 1px solid #439bc0;
    border-radius: 6px;
    padding: 7px 16px;
    text-decoration: none;
    transition: background 0.15s;
}

.khph-empty-btn:hover {
    background: #f0f8fc;
    text-decoration: none;
    color: #439bc0;
}

/* ── Card grid ── */
.khph-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.khph-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-background-primary);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

.khph-card:hover {
    border-color: #b5d9ea;
    box-shadow: 0 2px 8px rgba(67,155,192,0.12);
    text-decoration: none;
    color: inherit;
}

.khph-card-img {
    height: 80px;
    flex-shrink: 0;
    position: relative;
}

.khph-card-date-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(255,255,255,0.92);
    border-radius: 6px;
    padding: 3px 8px;
    text-align: center;
    line-height: 1.1;
}

.khph-card-month {
    display: block;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    color: #439bc0;
    letter-spacing: 0.05em;
}

.khph-card-day {
    display: block;
    font-size: 18px;
    font-weight: 500;
    color: #222;
}

.khph-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 500;
    background: rgba(255,255,255,0.92);
    color: #27500a;
    border-radius: 20px;
    padding: 2px 8px;
}

.khph-card-body {
    flex: 1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.khph-card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary);
    line-height: 1.3;
}

.khph-card-excerpt {
    font-size: 11px;
    color: #888;
    line-height: 1.4;
}

.khph-card-meta {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

.khph-card-footer {
    padding: 8px 12px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.khph-card-cta { font-size: 12px; font-weight: 500; color: #439bc0; }
.khph-card-amount { font-size: 11px; color: #888; }

/* Progress bar */
.khph-progress {
    height: 4px;
    background: #e0eef5;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}

.khph-progress-bar {
    height: 100%;
    background: #439bc0;
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* Taxonomy term pills */
.khph-term-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.khph-term-pill {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 20px;
    background: #f0f8fc;
    color: #1a6e8e;
    border: 1px solid #b5d9ea;
}


    background: #e8f4f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.khph-item-info {
    flex: 1;
    min-width: 0;
}

.khph-item-title {
    font-size: 13px;
    font-weight: 500;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.khph-item-meta {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

/* Badges */
.khph-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 20px;
    flex-shrink: 0;
    line-height: 1.5;
}

.khph-badge--active {
    background: #eaf3de;
    color: #27500a;
    border: 1px solid #c0dd97;
}

/* ── Volunteer website callout (shown when no events exist) ── */
.khph-callout {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #f0f8fc;
    border: 1px solid #b5d9ea;
    border-radius: 6px;
}

.khph-callout svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.khph-callout__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.khph-callout__text {
    font-size: 13px;
    color: #444;
    line-height: 1.4;
}

.khph-callout__link {
    font-size: 13px;
    font-weight: 500;
    color: #439bc0;
    text-decoration: none;
}

.khph-callout__link:hover {
    text-decoration: underline;
}

/* ── View all link ── */
.khph-view-all {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 10px;
    padding: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #439bc0;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s;
    box-sizing: border-box;
}

.khph-view-all:hover {
    background: #f0f8fc;
    text-decoration: none;
    color: #439bc0;
}
