/* Global page height management */
html {
    height: 100%;
}

:root {
    --bg-color: #f8f6f2;
    --text-color: #666;
    --text-secondary: #999;
    --text-light: #bbb;
    --link-color: #000;
    --border-color: #ccc;
    --surface-color: #f0f0f0;
    --code-bg: #f5f2f0;
    --editor-bg: #f9f9f9;
    --white: white;
    --border-light: #ddd;
}

/* inter-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/inter-v19-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* inter-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  src: url('./fonts/inter-v19-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* fira-code-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/fira-code-v26-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* share-tech-mono-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Share Tech Mono';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/share-tech-mono-v15-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

pre, code {
  font-family: 'Fira Code', monospace;
  font-weight: 400;
}

/* For Prism-kodblock */
pre[class*="language-"],
code[class*="language-"] {
  font-family: 'Fira Code', monospace;
  font-size: 1rem;
  font-variant-ligatures: none;
}

h1, h2 {
    font-family: 'Share Tech Mono';
    font-weight: 100;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    margin-bottom: 10px;
}

header h1 a {
    text-decoration: none;
}

.blog-subtitle {
    margin: -10px 0 15px 0;
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
    font-family: 'Share Tech Mono';
}

nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

nav form {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

nav input[type="text"] {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--white);
    transition: border-color 0.2s ease;
}

nav input[type="text"]:focus {
    outline: none;
    border-color: var(--text-color);
}

nav button {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    background: var(--text-color);
    color: var(--white);
    border: 1px solid var(--text-color);
    cursor: pointer;
    margin-right: 0;
    transition: all 0.2s ease;
}

nav button:hover {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
}

/* Upcoming post hint */
.upcoming-post-hint {
    background: linear-gradient(135deg, #f8f0f8 0%, #f0e8f5 100%);
    border-left: 3px solid #8b5cf6;
    padding: 12px 16px;
    margin-bottom: 30px;
    border-radius: 4px;
    font-size: 0.95em;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upcoming-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.upcoming-label {
    color: #8b5cf6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.upcoming-title {
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.1em;
    line-height: 1.4;
}

.upcoming-date {
    color: var(--text-secondary);
    font-size: 0.9em;
}

article {
    margin-bottom: 40px;
}

article h2, article h3 {
    margin-bottom: 10px;
}

.meta {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 10px;
}

.tags {
    margin: 10px 0;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    margin-right: 5px;
    background: var(--surface-color);
    font-size: 0.85em;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
}

a.tag:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.content {
    margin-top: 20px;
}

/* Content typography and spacing */
.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 {
    margin: 30px 0 15px 0;
    line-height: 1.3;
}

.content h1:first-child, .content h2:first-child, .content h3:first-child {
    margin-top: 0;
}

.content img {
    max-width: 100%;
}

.content p {
    margin: 20px 0;
    line-height: 1.7;
}

.content ul, .content ol {
    margin: 20px 0;
    padding-left: 0;
}

.content ul {
    list-style-type: disc;
    list-style-position: inside;
}

.content ol {
    list-style-type: decimal;
    list-style-position: inside;
}

.content li {
    margin: 8px 0;
    line-height: 1.7;
    padding-left: 10px;
}

.content li p {
    margin: 5px 0;
    display: inline;
}

.content blockquote {
    margin: 25px 0;
    padding: 15px 20px;
    border-left: 4px solid var(--border-color);
    background: var(--surface-color);
    font-style: italic;
}

footer {
    margin-top: 60px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
}

/* Admin styles */
.admin-container {
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: bold;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-row {
    display: flex;
    gap: 30px;
    margin-bottom: 15px;
}

.form-column {
    flex: 1;
}

.form-group.half {
    flex: 1;
    margin-bottom: 0;
}

/* Styled Checkbox */
.styled-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
}

.checkbox-custom {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid black;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.styled-checkbox:checked ~ .checkbox-custom {
    background: black;
}

.styled-checkbox:checked ~ .checkbox-custom::after {
    display: block;
}

.checkbox-text {
    font-weight: 500;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    background: var(--white);
    color: var(--text-color);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* Specific select styling */
.form-group select {
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M10.293%203.293L6%207.586%201.707%203.293A1%201%200%2000.293%204.707l5%205a1%201%200%20001.414%200l5-5a1%201%200%2010-1.414-1.414z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

/* Focus states for all form inputs */
.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--text-color);
}

/* Hover state for select */
.form-group select:hover {
    border-color: var(--text-secondary);
}

/* Disabled state */
.form-group select:disabled {
    background-color: var(--surface-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.form-group input[type="checkbox"] {
    margin-right: 5px;
}

.form-actions {
    margin-top: 20px;
}

button {
    padding: 8px 16px;
    margin-right: 10px;
    background: var(--white);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

button:hover {
    background: var(--surface-color);
}

#editor {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
    background: var(--editor-bg);
}

/* Code highlighting styles */
pre {
    background: var(--code-bg);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 15px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.4;
}

code {
    background: var(--code-bg);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

/* Override Prism.js theme to match our design */
pre[class*="language-"] {
    background: var(--code-bg);
    border: 1px solid var(--border-light);
}

code[class*="language-"] {
    background: transparent;
}

/* Ensure code blocks are responsive */
pre {
    max-width: 100%;
    white-space: pre-wrap;
    word-wrap: break-word;
}

@media (max-width: 600px) {
    body {
        padding: 15px;
    }
    
    nav {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
    }
    
    nav a {
        flex: 0 0 auto;
        padding: 5px 10px;
    }
    
    nav form {
        margin-left: 0;
        width: 100%;
        display: flex;
        gap: 8px;
        margin-top: 10px;
    }
    
    nav input[type="text"] {
        flex: 1;
        padding: 8px;
        font-size: 14px;
        border-radius: 4px;
        border: 1px solid var(--border-color);
        background: var(--white);
    }
    
    nav input[type="text"]:focus {
        outline: none;
        border-color: var(--text-color);
    }
    
    nav button {
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 4px;
        background: var(--text-color);
        color: var(--white);
        border: 1px solid var(--text-color);
        flex-shrink: 0;
    }
    
    nav button:hover {
        background: var(--text-secondary);
        border-color: var(--text-secondary);
    }
    
    pre {
        padding: 10px;
        font-size: 12px;
    }
    
    /* Form elements responsive styles */
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 36px 12px 12px;
        background-position: right 16px center;
    }
}

/* AI Chat Assistant Styles */
/* Split Screen Layout with CSS Grid */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* True 50/50 split */
    height: calc(100vh - 48px); /* Subtract navbar height */
    gap: 1px;
    background: var(--border-color);
    width: 100%;
    overflow: hidden;
}

/* Remove body max-width constraint for editor pages */
body.editor-page {
    max-width: none;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

body.editor-page main {
    height: calc(100vh - 48px); /* Subtract navbar height */
    overflow: hidden;
}

.editor-section {
    grid-column: 1;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-width: 0;
    min-height: 0;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    height: 72px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.editor-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.editor-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

#show-panel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.editor-section form {
    padding: 2rem;
}

.right-panel {
    grid-column: 2;
    background: var(--white);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    min-height: 0;
}

.right-panel.hidden {
    display: none;
}

.split-layout:has(.right-panel.hidden) {
    grid-template-columns: 1fr;
}

.split-layout:has(.right-panel.hidden) .editor-section {
    grid-column: 1;
}

/* Panel Controls */
.panel-controls {
    display: flex;
    align-items: stretch;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    height: 72px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.panel-toggle {
    background: none;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.panel-toggle:hover {
    background: var(--border-light);
    color: var(--text-color);
}

.panel-toggle.active {
    color: var(--text-color);
    border-bottom-color: var(--text-color);
    background: var(--white);
}

.panel-close {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
    margin-left: auto;
    transition: color 0.2s;
}

.panel-close:hover {
    color: var(--text-color);
}

/* Panel Content */
.panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
}

.panel-content-inner {
    padding: 15px;
}

/* AI Chat Panel in Split Layout */
#ai-chat-panel.active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ai-chat-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    height: 100%;
}

/* Media Browser Container */
.media-browser-container {
    display: flex;
    flex-direction: column;
}

.media-browser-content {
    margin-top: 20px;
}

/* Calendar Panel Container */
.calendar-panel-container {
    padding: 20px;
}

/* Agent mode selector */
.agent-mode-selector {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    background: var(--white);
    flex-shrink: 0;
}

.agent-mode-selector label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    margin-right: 8px;
}

.agent-mode-select {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 32px 6px 12px;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    min-width: 200px;
    font-family: inherit;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M10.293%203.293L6%207.586%201.707%203.293A1%201%200%2000.293%204.707l5%205a1%201%200%20001.414%200l5-5a1%201%200%2010-1.414-1.414z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.agent-mode-select:focus {
    outline: none;
    border-color: var(--text-color);
    background-color: var(--bg-color);
}

.agent-mode-select:hover {
    border-color: var(--text-secondary);
}


/* Agent response messages */
.chat-message .message-header {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 4px;
}

/* Admin UI improvements */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.filter-controls {
    display: flex;
    gap: 8px;
}

.filter-controls .btn-secondary.active {
    background: var(--text-color);
    color: var(--white);
}

.btn-primary, .btn-secondary, .btn-danger {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
    vertical-align: middle;
    text-align: center;
    box-sizing: border-box;
}

.btn-primary {
    background: var(--text-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--text-secondary);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: #dc3545;
    color: var(--white);
}

.btn-danger:hover {
    background: #c82333;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.status-published {
    background-color: #22c55e;
    color: white;
}

.status-draft {
    background-color: #f59e0b;
    color: white;
}

/* Articles list */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
}

.article-info {
    flex: 1;
}

.article-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.article-info h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.article-info h3 a:hover {
    text-decoration: none;
}

.article-meta {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 8px 0;
}

.article-summary {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

.article-actions {
    display: flex;
    gap: 8px;
    margin-left: 20px;
}

/* Dashboard */
.dashboard-actions {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

/* Login page */
.login-body {
    background: #000000;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.login-card h1 {
    text-align: center;
    margin: 0 0 8px 0;
    color: var(--text-color);
    font-size: 28px;
    font-weight: 600;
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin: 0 0 32px 0;
    font-size: 16px;
}

.login-form {
    margin-bottom: 24px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
}

.form-input {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    background: var(--white);
    color: var(--text-color);
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-button {
    width: 100%;
    background: #000000;
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: #333333;
}

.login-button:active {
    transform: translateY(0);
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #fcc;
}

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.login-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
}

.login-footer a:hover {
    color: var(--text-color);
}

/* Logout button */
.logout-btn {
    background: #dc3545;
    color: var(--white);
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.logout-btn:hover {
    background: #c82333;
}

/* Admin navbar for public pages */
.admin-navbar {
    background: #000000;
    color: var(--white);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-navbar-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 12px;
}

.admin-navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-nav-link {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.admin-logout-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Responsive admin navbar */
@media (max-width: 768px) {
    .admin-navbar-content {
        padding: 10px 16px;
        flex-direction: column;
        gap: 8px;
    }
    
    .admin-navbar-right {
        gap: 12px;
    }
    
    .admin-nav-link {
        font-size: 13px;
        padding: 4px 8px;
    }
    
    .admin-logout-btn {
        font-size: 13px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .admin-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .admin-username {
        font-size: 13px;
    }
    
    .admin-navbar-right {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .admin-nav-link {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .admin-logout-btn {
        font-size: 12px;
        padding: 3px 6px;
    }
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    display: flex;
    flex-direction: column;
}

.chat-message.user {
    text-align: right;
}

.chat-message.user p {
    background: var(--text-color);
    color: var(--white);
    display: inline-block;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    text-align: left;
    margin-left: auto;
    word-wrap: break-word;
    line-height: 1.4;
}

.chat-message.assistant p {
    background: var(--surface-color);
    display: inline-block;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.4;
}

.chat-message.assistant {
    position: relative;
}

.chat-message.assistant .message-content {
    background: var(--surface-color);
    padding: 16px;
    padding-top: 20px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
    position: relative;
}

.chat-message.assistant .message-content h1,
.chat-message.assistant .message-content h2,
.chat-message.assistant .message-content h3,
.chat-message.assistant .message-content h4,
.chat-message.assistant .message-content h5,
.chat-message.assistant .message-content h6 {
    margin: 0 0 12px 0;
    font-weight: 600;
}

.chat-message.assistant .message-content p {
    background: none;
    display: block;
    padding: 0;
    border-radius: 0;
    max-width: none;
    margin: 0 0 12px 0;
}

.chat-message.assistant .message-content p:last-child {
    margin-bottom: 0;
}

.chat-message.assistant .message-content ul,
.chat-message.assistant .message-content ol {
    margin: 0 0 12px 20px;
    padding: 0;
}

.chat-message.assistant .message-content li {
    margin-bottom: 6px;
}

.chat-message.assistant .message-content code {
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
}

.chat-message.assistant .message-content pre {
    background: var(--code-bg);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
}

.chat-message.assistant .message-content pre code {
    background: none;
    padding: 0;
}

.chat-message.assistant .copy-button {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--text-secondary);
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 10;
}

.chat-message.assistant .copy-button:hover {
    background: var(--text-color);
    color: var(--white);
    border-color: var(--text-color);
}

.chat-message.assistant ul {
    margin: 10px 0 0 20px;
}

.chat-message.error p {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.chat-input-form {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--white);
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    background: var(--bg-color);
    transition: border-color 0.2s;
}

.chat-input:focus {
    outline: none;
    border-color: var(--text-color);
    background: var(--white);
}

.send-chat {
    padding: 12px 20px;
    background: var(--text-color);
    color: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 80px;
}

.send-chat:hover {
    background: var(--text-secondary);
}

.send-chat:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

/* HTMX indicators */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline;
}

.htmx-request .send-text {
    display: none;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .ai-chat-toggle {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .ai-chat-panel {
        width: 100%;
        height: 70vh;
        max-height: 70vh;
        left: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
    }
    
    .ai-chat-header {
        padding: 16px 20px;
    }
    
    .ai-chat-header h3 {
        font-size: 16px;
    }
    
    .chat-messages {
        padding: 16px;
        gap: 12px;
    }
    
    .chat-message.user p,
    .chat-message.assistant p {
        max-width: 90%;
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .chat-input-form {
        padding: 16px;
        gap: 10px;
    }
    
    .chat-input {
        padding: 10px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .send-chat {
        padding: 10px 16px;
        min-width: 70px;
    }
    
    .chat-message.assistant .copy-button {
        top: 4px;
        right: 4px;
        padding: 3px 6px;
        font-size: 10px;
        gap: 2px;
    }
    
    .chat-message.assistant .copy-button svg {
        width: 12px;
        height: 12px;
    }
    
    /* Agent mode mobile styles */
    .agent-mode-selector {
        padding: 12px 16px;
    }
    
    .agent-mode-select {
        min-width: 150px;
        font-size: 13px;
    }
}

/* Markdown Preview */
.markdown-preview {
    padding: 20px;
    background: var(--white);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.preview-placeholder {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    margin-top: 50px;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4,
.markdown-preview h5,
.markdown-preview h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.3;
}

.markdown-preview h1 { font-size: 2em; }
.markdown-preview h2 { font-size: 1.5em; }
.markdown-preview h3 { font-size: 1.25em; }

.markdown-preview p {
    margin-bottom: 1em;
}

.markdown-preview ul,
.markdown-preview ol {
    margin: 1em 0;
    padding-left: 2em;
}

.markdown-preview li {
    margin-bottom: 0.5em;
}

.markdown-preview blockquote {
    border-left: 4px solid var(--border-color);
    margin: 1.5em 0;
    padding: 1em 1.5em;
    background: var(--surface-color);
    color: var(--text-secondary);
}

.markdown-preview code {
    background: var(--surface-color);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.9em;
}

.markdown-preview pre {
    background: var(--surface-color);
    padding: 1em;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1em 0;
}

.markdown-preview pre code {
    background: none;
    padding: 0;
}

.markdown-preview table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

.markdown-preview th,
.markdown-preview td {
    border: 1px solid var(--border-color);
    padding: 0.5em;
    text-align: left;
}

.markdown-preview th {
    background: var(--surface-color);
    font-weight: 600;
}

.markdown-preview img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em 0;
}

/* Desktop grid layout - true 50/50 split */
@media (min-width: 1025px) {
    .split-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    
    .editor-section {
        grid-column: 1;
    }
    
    .right-panel {
        grid-column: 2;
    }
    
    .split-layout:has(.right-panel.hidden) {
        grid-template-columns: 1fr;
    }
}

/* Tablet/Mobile responsive layout */
@media (max-width: 1024px) {
    .split-layout {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto 400px;
        height: auto;
    }
    
    .editor-section {
        grid-column: 1;
        grid-row: 1;
    }
    
    .right-panel {
        grid-column: 1;
        grid-row: 2;
        height: 400px;
    }
}

/* Hide right panel on smaller screens */
@media (max-width: 768px) {
    .right-panel {
        display: none !important;
    }
    
    .editor-section {
        flex: 1 !important;
    }
    
    #show-panel-btn {
        display: inline-flex !important;
    }
}

@media (max-width: 480px) {
    .ai-chat-panel {
        height: 80vh;
        max-height: 80vh;
    }
    
    .ai-chat-toggle {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .ai-chat-toggle svg {
        width: 20px;
        height: 20px;
    }
    
    /* Agent mode extra small mobile styles */
    .agent-mode-selector {
        padding: 10px 14px;
    }
    
    .agent-mode-select {
        min-width: 120px;
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* Tags page styling */
.tags-page {
    padding: 20px 0;
}

.tags-page h1 {
    margin-bottom: 10px;
}

.tags-description {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: baseline;
}

.tag-cloud-item {
    display: inline-block;
    padding: 8px 16px;
    background: var(--surface-color);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
    border-radius: 4px;
}

.tag-cloud-item:hover {
    background: var(--text-color);
    color: var(--bg-color);
    transform: translateY(-2px);
}

.tag-count {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-left: 4px;
}

/* Tag posts page styling */
.tag-posts {
    padding: 20px 0;
}

.tag-posts h1 {
    margin-bottom: 10px;
}

.tag-posts-count {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.no-posts {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 0;
    font-style: italic;
}

.tags-nav {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--surface-color);
}

.btn-secondary {
    display: inline-block;
    padding: 8px 16px;
    background: var(--surface-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--text-secondary);
    color: var(--bg-color);
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0 20px 0;
    flex-wrap: wrap;
}

.pagination-link {
    padding: 8px 12px;
    background: var(--surface-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
}

.pagination-link:hover {
    background: var(--text-color);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-current {
    padding: 8px 12px;
    background: var(--text-color);
    color: var(--white);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--text-color);
}

.pagination-info {
    margin-top: 15px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    width: 100%;
}

/* Mobile responsive pagination */
@media (max-width: 768px) {
    .pagination {
        gap: 6px;
        margin: 30px 0 15px 0;
    }
    
    .pagination-link,
    .pagination-current {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .pagination-info {
        font-size: 12px;
        margin-top: 12px;
    }
    
    /* Status badges responsive */
    .status-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
}

@media (max-width: 480px) {
    .pagination {
        gap: 4px;
        margin: 20px 0 10px 0;
    }
    
    .pagination-link,
    .pagination-current {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .pagination-info {
        font-size: 11px;
        margin-top: 10px;
    }
    
    /* Status badges extra small responsive */
    .status-badge {
        font-size: 10px;
        padding: 2px 6px;
        letter-spacing: 0.3px;
    }
}

/* Edit button styles for posts and pages */
.post-header,
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.post-header h1,
.page-header h1 {
    margin: 0;
    flex: 1;
}

.edit-btn {
    background: #007acc;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    margin-left: 20px;
    flex-shrink: 0;
}

.edit-btn:hover {
    background: #005fa3;
    color: white;
    text-decoration: none;
}

/* Responsive edit button */
@media (max-width: 768px) {
    .post-header,
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .edit-btn {
        margin-left: 0;
        margin-top: 10px;
        align-self: flex-end;
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* Calendar styles */
.calendar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid var(--border-color);
}

.calendar-header h2 {
    margin: 0;
    color: var(--text-color);
    font-size: 2rem;
    font-weight: 700;
}

.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 20px;
}

.calendar-nav-btn {
    background: var(--white);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.calendar-nav-btn:hover {
    background: var(--text-color);
    color: var(--white);
    border-color: var(--text-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calendar-current-month {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-color);
    min-width: 200px;
    text-align: center;
}

.calendar-grid {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: linear-gradient(135deg, var(--surface-color) 0%, #e8e8e8 100%);
    border-bottom: 2px solid var(--border-color);
}

.weekday {
    padding: 18px 10px;
    text-align: center;
    font-weight: 700;
    color: var(--text-secondary);
    border-right: 1px solid var(--border-light);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weekday:last-child {
    border-right: none;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    min-height: 600px;
}

.calendar-day {
    position: relative;
    min-height: 120px;
    padding: 12px;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    background: var(--white);
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day:hover:not(.empty) {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 2px rgba(0, 122, 204, 0.2);
}

.calendar-day.empty {
    background: #f9f9f9;
    cursor: default;
    opacity: 0.5;
}

.calendar-day.empty:hover {
    background: #f9f9f9;
    transform: none;
    box-shadow: none;
}

.calendar-day.today {
    background: linear-gradient(135deg, #e8f4fd 0%, #d1e9f8 100%);
    border: 2px solid #007acc;
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.1);
}

.calendar-day.today:hover {
    background: linear-gradient(135deg, #d1e9f8 0%, #b8ddf4 100%);
}

.calendar-day.today .day-number {
    color: #007acc;
    font-weight: 700;
}

.day-number {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    line-height: 1;
}

.calendar-day.empty .day-number {
    display: none;
}

.post-indicators {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
    margin-top: 8px;
}

.post-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.post-dot.published {
    background: #28a745;
}

.post-dot.draft {
    background: #ffc107;
}

.post-count {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-left: 6px;
    background: var(--surface-color);
    padding: 2px 6px;
    border-radius: 10px;
}

.calendar-day.has-published-post {
    border-left: 5px solid #28a745;
    padding-left: 10px;
}

.calendar-day.has-draft-post {
    border-left: 5px solid #ffc107;
    padding-left: 10px;
}

.calendar-day.has-multiple-posts {
    border-left: 5px solid #007acc;
    padding-left: 10px;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--surface-color) 0%, #e8e8e8 100%);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.legend-dot.published {
    background: #28a745;
}

.legend-dot.draft {
    background: #ffc107;
}

.legend-dot.multiple {
    background: #007acc;
}

/* Responsive calendar */
@media (max-width: 768px) {
    .calendar-container {
        padding: 15px;
        max-width: 100%;
        margin: 0;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 15px 0;
    }
    
    .calendar-header h2 {
        font-size: 1.6rem;
    }
    
    .calendar-navigation {
        gap: 15px;
        justify-content: center;
    }
    
    .calendar-current-month {
        font-size: 1.2rem;
        min-width: 160px;
    }
    
    .calendar-nav-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .calendar-grid {
        border-radius: 8px;
    }
    
    .calendar-days {
        min-height: 480px;
    }
    
    .calendar-day {
        min-height: 90px;
        padding: 8px;
    }
    
    .weekday {
        padding: 12px 5px;
        font-size: 11px;
    }
    
    .day-number {
        font-size: 16px;
        margin-bottom: 4px;
    }
    
    .post-indicators {
        gap: 4px;
        margin-top: 4px;
    }
    
    .post-dot {
        width: 8px;
        height: 8px;
    }
    
    .post-count {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .calendar-legend {
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
        padding: 15px;
    }
    
    .legend-item {
        font-size: 13px;
        gap: 8px;
    }
    
    .legend-dot {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .calendar-container {
        padding: 10px;
    }
    
    .calendar-header h2 {
        font-size: 1.4rem;
    }
    
    .calendar-current-month {
        font-size: 1.1rem;
        min-width: 140px;
    }
    
    .calendar-nav-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .calendar-days {
        min-height: 400px;
    }
    
    .calendar-day {
        min-height: 70px;
        padding: 6px;
    }
    
    .weekday {
        padding: 10px 2px;
        font-size: 10px;
    }
    
    .day-number {
        font-size: 14px;
    }
    
    .calendar-day.has-published-post,
    .calendar-day.has-draft-post,
    .calendar-day.has-multiple-posts {
        border-left-width: 3px;
        padding-left: 6px;
    }
}

/* Mini Calendar in Right Panel */
.mini-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 5px;
}

.mini-cal-nav-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mini-cal-nav-btn:hover {
    background: var(--text-color);
    color: var(--white);
}

.mini-cal-current-month {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.mini-calendar-grid {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.mini-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
}

.mini-weekday {
    padding: 8px 0;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #666;
}

.mini-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.mini-calendar-day {
    position: relative;
    aspect-ratio: 1;
    padding: 4px;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.mini-calendar-day:nth-child(7n) {
    border-right: none;
}

.mini-calendar-day.empty {
    background: #fafafa;
}

.mini-calendar-day.past {
    color: #ccc;
    cursor: not-allowed;
    background: #f9f9f9;
}

.mini-calendar-day.today {
    background: #e8f4fd;
    font-weight: 600;
}

.mini-calendar-day.today.occupied {
    background: #e8f4fd;
    cursor: not-allowed;
}

.mini-calendar-day.future {
    cursor: pointer;
}

.mini-calendar-day.future:hover:not(.occupied) {
    background: #f0f8ff;
    transform: scale(1.05);
}

.mini-calendar-day.occupied {
    cursor: not-allowed;
    opacity: 0.7;
}

.mini-calendar-day.occupied::after {
    content: '';
    position: absolute;
    inset: 2px;
    border: 2px solid #dc3545;
    border-radius: 4px;
    pointer-events: none;
}

.mini-calendar-day.selected {
    background: #007acc !important;
    color: white !important;
    font-weight: 600;
}

.mini-day-number {
    position: relative;
    z-index: 1;
}

.mini-post-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
}

.mini-post-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.mini-post-dot.published {
    background: #28a745;
}

.mini-post-dot.draft {
    background: #ffc107;
}

.mini-calendar-legend {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 11px;
}

.mini-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mini-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.mini-legend-dot.today {
    background: #e8f4fd;
    border: 1px solid #007acc;
}

.mini-legend-dot.published {
    background: #28a745;
}

.mini-legend-dot.draft {
    background: #ffc107;
}

/* Unscheduled posts section */
.mini-calendar-unscheduled {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.mini-unscheduled-header {
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-unscheduled-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mini-unscheduled-post {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
}

.mini-unscheduled-post:hover {
    background: #f8f9fa;
    border-color: #007acc;
    transform: translateY(-1px);
}

.mini-unscheduled-post .mini-post-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #495057;
}

/* Like button styles */
.post-actions {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-start;
}

.back-to-top {
    margin-top: 30px;
    text-align: center;
}

.back-to-top a {
    text-decoration: none;
    font-size: 0.95em;
    padding: 8px 16px;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s ease;
}

.like-button {
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.like-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.2s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.like-btn:hover {
    background: var(--surface-color);
    border-color: #ff6b6b;
    color: #ff6b6b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.like-btn:active {
    transform: translateY(0);
}

.heart-icon {
    width: 18px;
    height: 18px;
    transition: all 0.2s ease;
    color: currentColor;
}

.heart-icon.filled {
    color: #ff6b6b;
    animation: heartBeat 0.3s ease-in-out;
}

.like-button.liked .like-btn {
    background: #ffe6e6;
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.like-button.liked .like-btn:hover {
    background: #ffd4d4;
    transform: translateY(-1px);
}

.like-count {
    font-weight: 500;
    font-size: 13px;
    min-width: 20px;
    text-align: center;
}

/* Like button animation */
@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* HTMX loading state */
.like-btn.htmx-request {
    opacity: 0.7;
    cursor: not-allowed;
}

.like-btn.htmx-request::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Mobile responsiveness for like button */
@media (max-width: 768px) {
    .post-actions {
        margin-top: 30px;
        padding-top: 15px;
    }
    
    .like-btn {
        padding: 10px 18px;
        font-size: 15px;
    }
    
    .heart-icon {
        width: 20px;
        height: 20px;
    }
}

/* Featured Image Selector Styles */
.featured-image-selector {
    margin-top: 10px;
}

.featured-image-preview {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
    background: var(--surface-color);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.featured-image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.no-image-placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.no-image-placeholder svg {
    opacity: 0.5;
    margin-bottom: 10px;
}

.no-image-placeholder p {
    margin: 0;
    font-size: 14px;
}

/* Featured image in posts */
.post-featured-image {
    margin: 30px 0;
    text-align: center;
}

.post-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Featured image in home page summaries */
.post-summary-featured {
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 4px;
    max-height: 300px;
}

.post-summary-featured img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
    filter: grayscale(100%) contrast(1.5) brightness(1.05) saturate(0);
}

.post-summary-featured:hover img {
    transform: scale(1.05);
}