/*
 * Shared component styles for PostPlanIt's logged-in app pages (dashboard, create-post,
 * accounts, post-analytics) and the landing page. Relies on the CSS custom properties
 * defined in includes/theme.php (colors, typography, spacing, radius, shadow) - load
 * theme.php's <style> block before this file.
 *
 * Kept intentionally small: these are the classes that were previously copy-pasted with
 * drift across every page's own inline <style> block (.btn, .badge, .card, .empty-state,
 * .section-title). Page-specific layout stays in each page's own inline styles.
 */

/* ---- Buttons ---- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 28px;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, opacity 0.2s, border-color 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
}

.btn-secondary:hover {
    opacity: 0.75;
}

.btn-light {
    background: #fff;
    color: var(--bg-inverse);
}

.btn-light:hover {
    background: #e5e7eb;
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}

.btn-outline-danger:hover {
    background: var(--danger-bg);
}

.btn-sm {
    padding: 8px 14px;
    font-size: var(--text-sm);
}

/* ---- Badges ---- */

.badge {
    display: inline-block;
    background: var(--badge-color, var(--accent));
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);
}

/* Platform badges accept a per-platform color via inline style="--badge-color: #xxx"
   rather than one CSS class per platform, so any page can brand-color a badge without
   its own copy of a platform->color map living in CSS */
.platform-badge {
    display: inline-block;
    background: var(--badge-color, var(--accent));
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);
    margin-right: var(--space-2);
    margin-bottom: var(--space-2);
}

/* ---- Cards ---- */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* ---- Empty state ---- */

.empty-state {
    margin-top: var(--space-6);
    padding: 50px var(--space-6);
    background: var(--bg-card);
    border: 2px dashed var(--border-input);
    border-radius: var(--radius-md);
    text-align: center;
}

.empty-state h3 {
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
}

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

.section-title {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-3);
}
