/* Custom Styles for TailwindCourse */

/* Custom Scrollbar for a premium feel */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #475569;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #64748b;
}

/* Base formatting for injected HTML content (since Tailwind resets everything) */
.prose-custom h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
    color: inherit;
}

.prose-custom h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.dark .prose-custom h2 {
    border-bottom-color: #334155;
}

.prose-custom h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose-custom p {
    margin-bottom: 1.25rem;
    line-height: 1.75;
    color: #475569;
}

.dark .prose-custom p {
    color: #cbd5e1;
}

.prose-custom ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: #475569;
}

.dark .prose-custom ul {
    color: #cbd5e1;
}

.prose-custom li {
    margin-bottom: 0.5rem;
}

.prose-custom a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.prose-custom a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Inline code styles */
.prose-custom :not(pre) > code {
    background-color: #f1f5f9;
    color: #ef4444;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Fira Code', monospace;
}

.dark .prose-custom :not(pre) > code {
    background-color: #1e293b;
    color: #fca5a5;
    border: 1px solid #334155;
}

/* Code Block wrapper */
.code-wrapper {
    position: relative;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #1e1e1e; /* Prism background */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #2d2d2d;
    border-bottom: 1px solid #404040;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    color: #a3a3a3;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #e5e5e5;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Overriding Prism styles slightly for better fit */
pre[class*="language-"] {
    margin: 0 !important;
    padding: 1.25rem !important;
    border-radius: 0 0 0.75rem 0.75rem !important;
    font-size: 0.875rem !important;
    background: transparent !important;
}

/* Demo box for visualizing Tailwind classes */
.demo-box {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    background-color: #f8fafc;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark .demo-box {
    border-color: #334155;
    background-color: #0f172a;
    background-image: radial-gradient(#334155 1px, transparent 1px);
}
