/* MBC Hub - Tailwind CSS Overrides and Custom Styles */

/* CSS Variables for MBC Purple Theme */
:root {
    --mbc-purple: #8B5A96;
    --mbc-purple-light: #E6D7EA;
    --mbc-purple-dark: #5C3D5E;
}

/* Base font family */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
}

/* Utility classes for MBC Purple theme */
.text-mbc-purple { color: var(--mbc-purple); }
.bg-mbc-purple { background-color: var(--mbc-purple); }
.border-mbc-purple { border-color: var(--mbc-purple); }
.text-mbc-purple-light { color: var(--mbc-purple-light); }
.bg-mbc-purple-light { background-color: var(--mbc-purple-light); }
.text-mbc-purple-dark { color: var(--mbc-purple-dark); }
.bg-mbc-purple-dark { background-color: var(--mbc-purple-dark); }

.hover\:text-mbc-purple:hover { color: var(--mbc-purple); }
.hover\:bg-mbc-purple:hover { background-color: var(--mbc-purple); }
.hover\:bg-mbc-purple-dark:hover { background-color: var(--mbc-purple-dark); }

/* Ensure proper focus styles for accessibility */
.focus\:outline-mbc-purple:focus {
    outline-color: #8B5A8E;
}

/* Custom scrollbar for better UX */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #8B5A8E;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5C3D5E;
}

/* Accessibility styles */
.text-size-small {
    font-size: 90%;
}

.text-size-large {
    font-size: 110%;
}

.high-contrast {
    filter: contrast(150%) brightness(120%);
}

.high-contrast .bg-white {
    background-color: #ffffff !important;
    color: #000000 !important;
}

.high-contrast .text-gray-600,
.high-contrast .text-gray-700 {
    color: #000000 !important;
}

.reduce-motion,
.reduce-motion-forced {
    transition: none !important;
    animation: none !important;
}

.reduce-motion *,
.reduce-motion-forced * {
    transition: none !important;
    animation: none !important;
}

/* Content Page Custom Styles */

/* Table of Contents */
.toc-nav {
    max-height: 60vh;
    overflow-y: auto;
}

.toc-nav ul {
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0;
}

.toc-nav li {
    font-size: 0.875rem;
    margin: 0.5rem 0;
}

.toc-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.toc-nav a:hover {
    color: var(--mbc-purple);
    background-color: #faf5ff;
}

.toc-nav a.active {
    color: var(--mbc-purple);
    background-color: #faf5ff;
    font-weight: 500;
}

/* Pull-out quotes */
.lived-experience-quote {
    background: linear-gradient(135deg, #fdf2f8, #fef7ff);
    border: 1px solid #e9d5ff;
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 3rem 0;
    position: relative;
}

.lived-experience-quote::before {
    content: '"';
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: 4rem;
    color: #c4b5fd;
    font-family: serif;
    line-height: 1;
}

.lived-experience-quote .quote-text {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #1f2937;
    font-weight: 500;
    font-style: italic;
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.lived-experience-quote .quote-attribution {
    font-size: 0.875rem;
    color: #6b7280;
    padding-left: 2rem;
}

.lived-experience-quote .quote-attribution::before {
    content: '— ';
}

/* Resource embed styling */
.embedded-resource {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    transition: box-shadow 0.2s;
}

.embedded-resource:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.embedded-resource .resource-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: var(--mbc-purple);
    color: white;
    margin-bottom: 0.75rem;
}

.embedded-resource h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.embedded-resource .resource-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.embedded-resource .resource-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.embedded-resource .resource-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.embedded-resource .resource-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--mbc-purple);
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
}

.embedded-resource .resource-link:hover {
    background-color: var(--mbc-purple-dark);
}

.embedded-resource .resource-share {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #f3f4f6;
    color: #374151;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.embedded-resource .resource-share:hover {
    background-color: #e5e7eb;
}

/* Enhanced Typography for Content Articles */
.content-article {
    font-size: 1.125rem;
    line-height: 1.75;
}

.content-article h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    scroll-margin-top: 6rem;
    border-bottom: 2px solid #f3e8ff;
    padding-bottom: 0.5rem;
}

.content-article h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
    scroll-margin-top: 6rem;
}

.content-article p {
    margin-bottom: 1.5rem;
    line-height: 1.75;
}

.content-article ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    list-style-type: disc;
    list-style-position: outside;
}

.content-article ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    list-style-type: decimal;
    list-style-position: outside;
}

.content-article li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.content-article blockquote {
    border-left: 4px solid var(--mbc-purple);
    background-color: #faf5ff;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
}

.content-article blockquote p {
    color: #374151;
    font-weight: 500;
    font-style: italic;
    margin-bottom: 0;
}

/* Callout boxes */
.callout-box {
    border-left: 4px solid;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
}

.callout-box h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.callout-box .prose {
    max-width: none;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }
}