/* =============================================================================
   KH Control Center — Styles
   Scoped under .khcc-* to avoid collisions with BuddyBoss / theme styles.
   !important is used selectively on link color/text-decoration to defeat
   BuddyBoss anchor overrides.
   ============================================================================= */

.khcc-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a1a;
    max-width: 100%;
    box-sizing: border-box;
}

.khcc-wrapper *,
.khcc-wrapper *::before,
.khcc-wrapper *::after {
    box-sizing: border-box;
}

/* ----- Page header ----- */

.khcc-page-header {
    margin: 0 0 24px;
}

.khcc-page-title {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.khcc-page-subtitle {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

/* ----- Section ----- */

.khcc-section {
    background: #eef2f6;
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 16px;
}

.khcc-section:last-child {
    margin-bottom: 0;
}

.khcc-section-title {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

/* ----- Block ----- */

.khcc-block {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
}

.khcc-block-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

/* ----- Block grid (multi-block sections) ----- */

.khcc-block-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
}

@media (max-width: 720px) {
    .khcc-block-grid {
        grid-template-columns: 1fr;
    }
}

/* ----- Button grid (single-block sections) ----- */

.khcc-button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 540px) {
    .khcc-button-grid {
        grid-template-columns: 1fr;
    }
}

/* ----- Button stack (vertical, used inside multi-block layouts) ----- */

.khcc-button-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ----- Button ----- */

.khcc-button {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #ffffff;
    border: 1.5px solid #439bc0;
    border-radius: 8px;
    color: #439bc0 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.khcc-button:hover,
.khcc-button:focus {
    background: rgba(67, 155, 192, 0.08);
    border-color: #2f7d9e;
    color: #2f7d9e !important;
    text-decoration: none !important;
    outline: none;
}

.khcc-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(67, 155, 192, 0.25);
}

.khcc-button-label {
    flex: 1;
    text-align: left;
}

.khcc-button-arrow {
    font-size: 16px;
    margin-left: 8px;
    line-height: 1;
}

/* ----- Phoebee passthrough -----
   Phoebee's plugin handles its own styling; we just give it a card to live in.
   Padding is reduced because Phoebee may add its own internal padding.
   ----- */

.khcc-phoebee {
    padding: 12px 14px;
}

/* ----- Unavailable / logged-out message ----- */

.khcc-unavailable .khcc-message {
    text-align: center;
    padding: 32px 20px;
}

.khcc-unavailable .khcc-message p {
    margin: 0;
    font-size: 16px;
    color: #6b7280;
    line-height: 1.5;
}

/* ----- Callout (full-width promo banner) -----
   Used for highlighted feature announcements. Distinct from regular sections:
   stronger brand-blue tint, no inner white card, horizontal flex layout with
   copy on the left and a primary CTA button on the right. Stacks on mobile.
   ----- */

.khcc-callout {
    background: #d4e7f0;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.khcc-callout:last-child {
    margin-bottom: 0;
}

.khcc-callout-content {
    flex: 1;
    min-width: 280px;
}

.khcc-callout-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 600;
    color: #1a4a5f;
    line-height: 1.3;
}

.khcc-callout-description {
    margin: 0;
    font-size: 14px;
    color: #2a5a73;
    line-height: 1.5;
}

/* Primary (filled) button variant — used inside callouts. Inherits layout
   from .khcc-button but overrides background and text colors. */

.khcc-button.khcc-button-primary {
    background: #439bc0 !important;
    border-color: #439bc0 !important;
    color: #ffffff !important;
    font-weight: 600;
    padding: 12px 22px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.khcc-button.khcc-button-primary:hover,
.khcc-button.khcc-button-primary:focus {
    background: #2f7d9e !important;
    border-color: #2f7d9e !important;
    color: #ffffff !important;
}

@media (max-width: 540px) {
    .khcc-callout {
        flex-direction: column;
        align-items: stretch;
    }

    .khcc-button.khcc-button-primary {
        justify-content: center;
    }
}
