html, body {
    font-family: "Montserrat", serif;
}

ol, ul {
    list-style-type: disc;
    padding-left: 2.5rem;
    margin: 1rem 0;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA9NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDg  NjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.text-substack {
    color: #ff6b00;
}

.bg-substack {
    background-color: #ff6b00;
}

.bg-pink {
    background-color: #db2777;
}

.btn-substack {
    background-color: #db2777; /* text-pink-600 equivalent background */
}

    .btn-substack:hover {
        background-color: #be185d; /* darker hover */
    }

.custom-background-blur {
    backdrop-filter: blur(5px);
}

ul > li::marker {
    font-weight: bold;
}

a {
    color: #db2777;
    text-decoration: underline;
    font-weight: 600;
}

    a:hover {
        text-decoration: underline;
        color: #be185d; /* Optional: slightly darker on hover */
    }

    a.btn-substack:hover {
        text-decoration: underline;
        color: #ffffff; /* Optional: slightly darker on hover */
    }

/* CMS Editor Sidebar Layout */
.cms-content-with-sidebar {
    margin-left: 60px;
    transition: margin-left 0.3s ease;
}

@media (max-width: 768px) {
    .cms-content-with-sidebar {
        margin-left: 50px;
    }
}

/* Quill Editor Content Styling */
.ql-editor,
.ql-content {
    /* Font sizes */
    font-size: 18px;
    line-height: 28px;
}

.ql-editor .ql-size-small,
.ql-content .ql-size-small {
    font-size: 0.75em;
}

    .ql-editor .ql-size-large,
    .ql-content .ql-size-large {
        font-size: 24px;
        line-height: 32px;
    }

    .ql-editor .ql-size-huge,
    .ql-content .ql-size-huge {
        font-size: 30px;
        line-height: 36px;
    }

/* Headers */
.ql-editor h1, .ql-content h1 { font-size: 2em; font-weight: bold; margin: 0.67em 0; }
.ql-editor h2, .ql-content h2 { font-size: 1.5em; font-weight: bold; margin: 0.75em 0; }
.ql-editor h3, .ql-content h3 { font-size: 1.17em; font-weight: bold; margin: 0.83em 0; }
.ql-editor h4, .ql-content h4 { font-size: 1em; font-weight: bold; margin: 1.12em 0; }
.ql-editor h5, .ql-content h5 { font-size: 0.83em; font-weight: bold; margin: 1.5em 0; }
.ql-editor h6, .ql-content h6 { font-size: 0.75em; font-weight: bold; margin: 1.67em 0; }

/* Text alignment */
.ql-editor .ql-align-left,
.ql-content .ql-align-left {
    text-align: left;
}

.ql-editor .ql-align-center,
.ql-content .ql-align-center {
    text-align: center;
}

.ql-editor .ql-align-right,
.ql-content .ql-align-right {
    text-align: right;
}

.ql-editor .ql-align-justify,
.ql-content .ql-align-justify {
    text-align: justify;
}

/* Lists */
.ql-editor ul,
.ql-content ul {
    list-style-type: disc;
    padding-left: 2.5rem;
    margin: 1rem 0;
}

.ql-editor ol,
.ql-content ol {
    list-style-type: decimal;
    padding-left: 2.5rem;
    margin: 1rem 0;
}

.ql-editor li,
.ql-content li {
    margin-bottom: 0.5rem;
    display: list-item;
}

/* Indentation */
.ql-editor .ql-indent-1,
.ql-content .ql-indent-1 { padding-left: 3em; }
.ql-editor .ql-indent-2,
.ql-content .ql-indent-2 { padding-left: 6em; }
.ql-editor .ql-indent-3,
.ql-content .ql-indent-3 { padding-left: 9em; }
.ql-editor .ql-indent-4,
.ql-content .ql-indent-4 { padding-left: 12em; }
.ql-editor .ql-indent-5,
.ql-content .ql-indent-5 { padding-left: 15em; }
.ql-editor .ql-indent-6,
.ql-content .ql-indent-6 { padding-left: 18em; }
.ql-editor .ql-indent-7,
.ql-content .ql-indent-7 { padding-left: 21em; }
.ql-editor .ql-indent-8,
.ql-content .ql-indent-8 { padding-left: 24em; }

/* Blockquotes */
    .ql-editor blockquote,
    .ql-content blockquote {
        border-left: 4px solid #EC4899;
        margin: 1em 0;
        padding-left: 1em;
        font-style: italic;
    }

/* Code blocks */
.ql-editor pre,
.ql-content pre {
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
  padding: 1em;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
 margin: 1em 0;
}

.ql-editor code,
.ql-content code {
    background-color: #f4f4f4;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* Links */
.ql-editor a,
.ql-content a {
    color: #db2777;
    text-decoration: underline;
}

.ql-editor a:hover,
.ql-content a:hover {
    color: #be185d;
}

/* Note: Links in rich text content open in new tabs by default (set via JavaScript) */

/* Fonts */
.ql-editor .ql-font-serif,
.ql-content .ql-font-serif {
    font-family: Georgia, Times, serif;
}

.ql-editor .ql-font-monospace,
.ql-content .ql-font-monospace {
    font-family: Monaco, Courier, monospace;
}

/* Text formatting */
.ql-editor strong,
.ql-content strong {
    font-weight: bold;
}

.ql-editor em,
.ql-content em {
    font-style: italic;
}

.ql-editor u,
.ql-content u {
    text-decoration: underline;
}

.ql-editor s,
.ql-content s {
    text-decoration: line-through;
}

/* Rich Text Editor Styles */

/* Custom Text Box Styles */
.ql-editor .text-box,
.ql-content .text-box {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    margin: 0.25rem 0;
    border: 1px solid transparent;
    font-weight: 500;
    line-height: 1.6;
}

/* Info Box - Blue */
.ql-editor .text-box.box-info,
.ql-content .text-box.box-info {
    background-color: #e3f2fd;
    color: #0d47a1;
    border-color: #90caf9;
}

/* Warning Box - Yellow/Orange */
.ql-editor .text-box.box-warning,
.ql-content .text-box.box-warning {
    background-color: #fff3e0;
    color: #e65100;
    border-color: #ffb74d;
}

/* Success Box - Green */
.ql-editor .text-box.box-success,
.ql-content .text-box.box-success {
    background-color: #e8f5e9;
    color: #1b5e20;
    border-color: #81c784;
}

/* Danger Box - Red */
.ql-editor .text-box.box-danger,
.ql-content .text-box.box-danger {
    background-color: #ffebee;
    color: #b71c1c;
    border-color: #ef9a9a;
}

/* Custom Box - User defined colors */
.ql-editor .text-box.box-custom,
.ql-content .text-box.box-custom {
    /* Default styling - background color will be set inline via JavaScript */
    background-color: #e3f2fd;
    color: #1a1a1a;
    border-color: rgba(0, 0, 0, 0.1);
}

/* Hover effects for better UX */
.ql-editor .text-box:hover,
.ql-content .text-box:hover {
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

/* Block-level text boxes (for larger content areas) */
.ql-editor .text-box-block,
.ql-content .text-box-block {
    display: block;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-radius: 0.5rem;
    border: 1px solid transparent;
}

.ql-editor .text-box-block.box-info,
.ql-content .text-box-block.box-info {
    background-color: #e3f2fd;
    color: #0d47a1;
    border-color: #90caf9;
}

.ql-editor .text-box-block.box-warning,
.ql-content .text-box-block.box-warning {
    background-color: #fff3e0;
    color: #e65100;
    border-color: #ffb74d;
}

.ql-editor .text-box-block.box-success,
.ql-content .text-box-block.box-success {
    background-color: #e8f5e9;
    color: #1b5e20;
    border-color: #81c784;
}

.ql-editor .text-box-block.box-danger,
.ql-content .text-box-block.box-danger {
    background-color: #ffebee;
    color: #b71c1c;
    border-color: #ef9a9a;
}

.ql-editor .text-box-block.box-custom,
.ql-content .text-box-block.box-custom {
    background-color: #e3f2fd;
    color: #1a1a1a;
    border-color: rgba(0, 0, 0, 0.1);
}

/* Ensure text inside boxes maintains readability */
.ql-editor .text-box a,
.ql-content .text-box a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

.ql-editor .text-box strong,
.ql-content .text-box strong {
    font-weight: 700;
}

/* Icon support for boxes using Bootstrap Icons */
.ql-editor .text-box::before,
.ql-content .text-box::before {
    font-family: 'bootstrap-icons';
    font-weight: normal;
    font-style: normal;
    margin-right: 0.5rem;
    display: inline-block;
}

.ql-editor .text-box.box-info::before,
.ql-content .text-box.box-info::before {
    content: "\f431"; /* bi-info-circle */
}

.ql-editor .text-box.box-warning::before,
.ql-content .text-box.box-warning::before {
    content: "\f33a"; /* bi-exclamation-triangle */
}

.ql-editor .text-box.box-success::before,
.ql-content .text-box.box-success::before {
    content: "\f26b"; /* bi-check-circle */
}

.ql-editor .text-box.box-danger::before,
.ql-content .text-box.box-danger::before {
    content: "\f623"; /* bi-x-circle */
}

/* No icon for custom boxes */
.ql-editor .text-box.box-custom::before,
.ql-content .text-box.box-custom::before {
    content: "";
    margin-right: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ql-editor .text-box,
    .ql-content .text-box {
        display: block;
        margin: 0.5rem 0;
    }
}
