/**
 * ModernBlog Custom CSS
 * Additional styles beyond Tailwind
 */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better focus styles */
:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Prose styles for post content */
.prose {
    max-width: 65ch;
    color: #374151;
}

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    line-height: 1.75;
}

.prose h2 {
    margin-top: 2em;
    margin-bottom: 1em;
    font-size: 1.5em;
    font-weight: 700;
    line-height: 1.3333333;
}

.prose h3 {
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    font-size: 1.25em;
    font-weight: 600;
    line-height: 1.6;
}

.prose ul, .prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose blockquote {
    font-style: italic;
    border-left-width: 4px;
    border-left-color: #3b82f6;
    background-color: #f9fafb;
    padding: 1em 1.5em;
    margin: 1.5em 0;
}

.prose img {
    margin-top: 2em;
    margin-bottom: 2em;
    border-radius: 0.75rem;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print styles */
@media print {
    .sticky,
    .sidebar-panel,
    #searchPanel,
    .report-btn,
    .like-btn,
    footer form {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}
/* Post Images Grid */
.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}
.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Image hover effect */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* See More Button Animation */
.see-more-btn {
    transition: all 0.2s ease;
}
.see-more-btn:hover {
    gap: 0.5rem;
}

/* Post Content Transition */
.post-full-content {
    transition: all 0.3s ease;
}

/* Image Gallery Modal */
.image-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.image-modal-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

/* Emoji Picker Styles */
#emojiPicker {
    position: absolute;
    z-index: 100;
    width: 280px;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
#emojiPicker button {
    font-size: 20px;
    padding: 6px;
    border-radius: 4px;
}
#emojiPicker button:hover {
    background: #f3f4f6;
}

/* Responsive */
@media (max-width: 640px) {
    #emojiPicker {
        width: 240px;
        max-height: 160px;
    }
    #emojiPicker button {
        font-size: 18px;
        padding: 4px;
    }
    .grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}