/* Custom styles for AICOM */

/* Prose styles for post content */
.prose {
    line-height: 1.75;
}

.prose p {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.prose a {
    color: hsl(222.2 47.4% 11.2%);
    text-decoration: underline;
}

.prose a:hover {
    color: hsl(222.2 47.4% 20%);
}

.prose ul,
.prose ol {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.prose li {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.prose blockquote {
    border-left: 4px solid hsl(214.3 31.8% 91.4%);
    padding-left: 1rem;
    margin: 1rem 0;
    color: hsl(215.4 16.3% 46.9%);
}

.prose pre {
    background-color: hsl(210 40% 96.1%);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

.prose code {
    background-color: hsl(210 40% 96.1%);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
}

/* Quill editor overrides */
.ql-container {
    font-family: inherit;
    font-size: 0.875rem;
}

.ql-editor {
    min-height: 250px;
}

.ql-editor.ql-blank::before {
    font-style: normal;
    color: hsl(215.4 16.3% 46.9%);
}

.ql-toolbar.ql-snow {
    border-color: hsl(214.3 31.8% 91.4%);
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

.ql-container.ql-snow {
    border-color: hsl(214.3 31.8% 91.4%);
    border-bottom-left-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Toast notifications */
.toast {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    animation: slideIn 0.3s ease-out;
}

.toast-success {
    background-color: hsl(142 76% 36%);
    color: white;
}

.toast-error {
    background-color: hsl(0 84.2% 60.2%);
    color: white;
}

.toast-info {
    background-color: hsl(222.2 47.4% 11.2%);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading spinner */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .ql-editor {
        min-height: 200px;
    }
}

/* Comment reply indent */
.comment-reply {
    margin-left: 2rem;
    padding-left: 1rem;
    border-left: 2px solid hsl(214.3 31.8% 91.4%);
}
