/* ── Primary Button ──────────────────────────────────────── */

.xfact-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all 0.3s ease;
    background: var(--xfact-dark-section) !important;
    border: 1px solid transparent !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    z-index: 0;
    text-decoration: none;
    border-radius: var(--xfact-glass-radius);
}

.xfact-btn-primary:hover {
    background: color-mix(in srgb, var(--xfact-dark-section) 85%, #000) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* ── Primary Button in Dark Sections & Dark Mode (Glassmorphism) ── */
.xfact-dark-section .xfact-btn-primary,
[data-theme="dark"] .xfact-btn-primary,
.xfact-dark-section .wp-element-button,
[data-theme="dark"] .wp-element-button {
    background: var(--xfact-glass-bg) !important;
    backdrop-filter: var(--xfact-glass-blur);
    -webkit-backdrop-filter: var(--xfact-glass-blur);
    border: 1px solid var(--xfact-glass-border) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    color: #ffffff !important;
}

.xfact-dark-section .xfact-btn-primary:hover,
[data-theme="dark"] .xfact-btn-primary:hover,
.xfact-dark-section .wp-element-button:hover,
[data-theme="dark"] .wp-element-button:hover {
    background: var(--xfact-glass-bg-hover) !important;
    border-color: var(--xfact-glass-border-hover) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #ffffff !important;
}

.xfact-btn-default {
    height: 2.75rem;
    padding: 0 1.25rem;
    font-size: 0.875rem;
}

.xfact-btn-lg {
    height: 3rem;
    padding: 0 1.5rem;
    font-size: 0.875rem;
}

/* ── Secondary Button ──────────────────────────────────── */

.xfact-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: var(--xfact-glass-radius);
    border: 1px solid var(--xfact-glass-border);
    color: var(--wp--preset--color--text-primary);
    background: var(--xfact-glass-bg);
    backdrop-filter: var(--xfact-glass-blur);
    -webkit-backdrop-filter: var(--xfact-glass-blur);
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.xfact-btn-secondary:hover {
    background: var(--xfact-glass-bg-hover);
    border-color: var(--xfact-glass-border-hover);
    color: var(--wp--preset--color--primary-dark);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

html[data-theme="dark"] .xfact-btn-secondary:hover {
    color: var(--wp--preset--color--white);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ── Secondary Contextual (Dark Section) ───────────────── */

.xfact-dark-section .xfact-btn-secondary {
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.xfact-dark-section .xfact-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 12px rgba(0, 0, 0, 0.2);
}
