/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Custom Theme Definitions */
[data-theme="light"] {
    --color-base-100: oklch(98% 0 0);
    --color-base-200: oklch(97% 0 0);
    --color-base-300: oklch(92% 0 0);
    --color-base-content: oklch(20% 0 0);
    --color-primary: oklch(70% 0.191 22.216);
    --color-primary-content: oklch(25% 0.092 26.042);
    --color-secondary: oklch(71% 0.203 305.504);
    --color-secondary-content: oklch(29% 0.149 302.717);
    --color-accent: oklch(79% 0.209 151.711);
    --color-accent-content: oklch(26% 0.065 152.934);
    --color-neutral: oklch(20% 0 0);
    --color-neutral-content: oklch(98% 0 0);
    --color-info: oklch(58% 0.158 241.966);
    --color-info-content: oklch(97% 0.013 236.62);
    --color-success: oklch(59% 0.145 163.225);
    --color-success-content: oklch(97% 0.021 166.113);
    --color-warning: oklch(64% 0.222 41.116);
    --color-warning-content: oklch(98% 0.016 73.684);
    --color-error: oklch(58% 0.253 17.585);
    --color-error-content: oklch(96% 0.015 12.422);
}

[data-theme="dark"] {
    --color-base-100: oklch(20.84% 0.008 17.911);
    --color-base-200: oklch(18.522% 0.007 17.911);
    --color-base-300: oklch(16.203% 0.007 17.911);
    --color-base-content: oklch(83.768% 0.001 17.911);
    --color-primary: oklch(68.628% 0.185 148.958);
    --color-primary-content: oklch(0% 0 0);
    --color-secondary: oklch(69.776% 0.135 168.327);
    --color-secondary-content: oklch(13.955% 0.027 168.327);
    --color-accent: oklch(70.628% 0.119 185.713);
    --color-accent-content: oklch(14.125% 0.023 185.713);
    --color-neutral: oklch(30.698% 0.039 171.364);
    --color-neutral-content: oklch(86.139% 0.007 171.364);
    --color-info: oklch(72.06% 0.191 231.6);
    --color-info-content: oklch(0% 0 0);
    --color-success: oklch(64.8% 0.15 160);
    --color-success-content: oklch(0% 0 0);
    --color-warning: oklch(84.71% 0.199 83.87);
    --color-warning-content: oklch(0% 0 0);
    --color-error: oklch(71.76% 0.221 22.18);
    --color-error-content: oklch(0% 0 0);
}

/* Rich Text Content Styling */
.rich-text-content {
    line-height: 1.6;
    color: oklch(var(--color-base-content));
}

.rich-text-content h1 {
    font-size: 2.25rem; /* 36px */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.rich-text-content h1:first-child {
    margin-top: 0;
}

.rich-text-content h2 {
    font-size: 1.875rem; /* 30px */
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.rich-text-content h2:first-child {
    margin-top: 0;
}

.rich-text-content h3 {
    font-size: 1.5rem; /* 24px */
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    margin-top: 1.25rem;
}

.rich-text-content h3:first-child {
    margin-top: 0;
}

.rich-text-content h4 {
    font-size: 1.25rem; /* 20px */
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.rich-text-content h4:first-child {
    margin-top: 0;
}

.rich-text-content p {
    margin-bottom: 1rem;
}

.rich-text-content ul,
.rich-text-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.rich-text-content ul {
    list-style-type: disc;
}

.rich-text-content ol {
    list-style-type: decimal;
}

.rich-text-content li {
    margin-bottom: 0.25rem;
    line-height: 1.6;
}

.rich-text-content ul ul,
.rich-text-content ol ol,
.rich-text-content ul ol,
.rich-text-content ol ul {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.rich-text-content ul ul {
    list-style-type: circle;
}

.rich-text-content ul ul ul {
    list-style-type: square;
}

.rich-text-content a {
    color: oklch(var(--color-primary));
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rich-text-content a:hover {
    color: oklch(var(--color-info));
    background-color: oklch(var(--color-primary));
    transition: all 0.2s ease;
}

.rich-text-content blockquote {
    border-left: 4px solid oklch(var(--color-primary));
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    background-color: oklch(var(--color-base-200));
    padding: 1rem;
    border-radius: 4px;
}

.rich-text-content strong,
.rich-text-content b {
    font-weight: 600;
}

.rich-text-content em,
.rich-text-content i {
    font-style: italic;
}

.rich-text-content code {
    background-color: oklch(#eee) !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    font-family:
        ui-monospace, SFMono-Regular, "SF Mono", Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem;
}

.rich-text-content pre {
    background-color: oklch(var(--color-base-300));
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1rem 0;
    font-family:
        ui-monospace, SFMono-Regular, "SF Mono", Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem;
    line-height: 1.4;
}

.rich-text-content pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}

/* Apply rich text styling to trix editor content as well */
trix-editor.rich-text-content {
    min-height: 12rem;
    padding: 1rem;
    border: 1px solid oklch(var(--color-base-300));
    border-radius: 0.5rem;
    background-color: oklch(var(--color-base-100));
}

trix-editor.rich-text-content:focus {
    outline: 2px solid oklch(var(--color-primary));
    outline-offset: 2px;
}
