/**
 * Modern CSS for ContAInt Theme
 * A clean, modern design for showcasing AI content
 */

:root {
    /* Light Theme Variables */
    --body-bg: #f8fafc;
    --text-color: #1e293b;
    --heading-color: #0f172a;
    --link-color: #2563eb;
    --link-hover: #1d4ed8;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --button-bg: #2563eb;
    --button-text: #ffffff;
    --button-hover: #1d4ed8;
    --code-bg: #f1f5f9;
    --code-color: #334155;
    --highlight-bg: rgba(37, 99, 235, 0.1);
    --header-bg: #ffffff;
    --footer-bg: #f1f5f9;
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
    --input-focus: #2563eb;
    --sidebar-bg: #f8fafc;
    --ai-output-bg: #f0f9ff;
    --ai-border: #bae6fd;
    --pill-bg: #e0f2fe;
    --pill-color: #0369a1;
}

/* Dark Theme Variables */
.theme-dark {
    --body-bg: #0f172a;
    --text-color: #e2e8f0;
    --heading-color: #f8fafc;
    --link-color: #3b82f6;
    --link-hover: #60a5fa;
    --border-color: #334155;
    --card-bg: #1e293b;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --button-bg: #3b82f6;
    --button-text: #ffffff;
    --button-hover: #60a5fa;
    --code-bg: #334155;
    --code-color: #e2e8f0;
    --highlight-bg: rgba(59, 130, 246, 0.2);
    --header-bg: #1e293b;
    --footer-bg: #0f172a;
    --input-bg: #1e293b;
    --input-border: #475569;
    --input-focus: #3b82f6;
    --sidebar-bg: #1e293b;
    --ai-output-bg: #0c4a6e;
    --ai-border: #0369a1;
    --pill-bg: #0c4a6e;
    --pill-color: #7dd3fc;
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--body-bg);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--heading-color);
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--link-hover);
    text-decoration: underline;
}

code, pre {
    font-family: 'Roboto Mono', monospace;
    background-color: var(--code-bg);
    color: var(--code-color);
    border-radius: 4px;
}

code {
    padding: 0.2em 0.4em;
    font-size: 0.9em;
}

pre {
    padding: 1rem;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-content {
    display: flex;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.content-area {
    flex: 1;
    min-width: 0;
}

/* Layout styles */
.layout-standard .content-area {
    max-width: 1200px;
}

.layout-wide .container {
    max-width: 1600px;
}

.layout-boxed .container {
    max-width: 1000px;
}

/* Sidebar positioning */
.sidebar-right .content-area {
    margin-right: 2rem;
}

.sidebar-left .site-content {
    flex-direction: row-reverse;
}

.sidebar-left .content-area {
    margin-left: 2rem;
}

.sidebar-none .widget-area {
    display: none;
}

.sidebar-none .content-area {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
}

/* Header */
.site-header {
    background-color: var(--header-bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: var(--heading-color);
    text-decoration: none;
}

.site-description {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    margin: 0.25rem 0 0;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.main-navigation li {
    margin-left: 1.5rem;
}

.main-navigation a {
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 0;
    color: var(--text-color);
    position: relative;
}

.main-navigation a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--link-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover:after,
.main-navigation .current-menu-item a:after {
    width: 100%;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.button,
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
    display: inline-block;
    background-color: var(--button-bg);
    color: var(--button-text);
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
}

.button:hover,
button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
    background-color: var(--button-hover);
    text-decoration: none;
}

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea,
select {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    padding: 0.75rem;
    width: 100%;
    color: var(--text-color);
    transition: border-color 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Widget Area */
.widget-area {
    width: 300px;
    flex-shrink: 0;
}

.widget {
    margin-bottom: 2rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.widget-title {
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg);
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.site-info {
    font-size: 0.9rem;
    text-align: center;
}

/* Posts */
.post {
    margin-bottom: 3rem;
}

.entry-title {
    margin-top: 0;
}

.entry-meta {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1rem;
}

.entry-content {
    margin-top: 1.5rem;
}

.post-thumbnail {
    margin-bottom: 1.5rem;
}

.post-thumbnail img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

/* AI-specific styling */
.ai-output {
    background-color: var(--ai-output-bg);
    border-left: 4px solid var(--ai-border);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.ai-tag {
    display: inline-block;
    background-color: var(--pill-bg);
    color: var(--pill-color);
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* AI Dashboard specific styles (when plugin is active) */
.agc-active .ai-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.ai-dashboard-panel {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

@media (max-width: 768px) {
    .agc-active .ai-dashboard {
        grid-template-columns: 1fr;
    }
    
    .site-content {
        flex-direction: column;
    }
    
    .widget-area {
        width: 100%;
        margin-top: 2rem;
    }
    
    .sidebar-left .content-area,
    .sidebar-right .content-area {
        margin-left: 0;
        margin-right: 0;
    }
    
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-navigation {
        margin-top: 1rem;
    }
    
    .main-navigation ul {
        flex-wrap: wrap;
    }
    
    .main-navigation li {
        margin-left: 0;
        margin-right: 1.5rem;
        margin-bottom: 0.5rem;
    }
}

/* Additional styling for AI plugin elements */
.agc-form-container {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.agc-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.agc-tab {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: 500;
}

.agc-tab.active {
    color: var(--link-color);
    border-bottom-color: var(--link-color);
}

.agc-result {
    background-color: var(--ai-output-bg);
    border: 1px solid var(--ai-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

/* Mobile Menu Styling */
.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text-color);
        padding: 0.5rem;
        cursor: pointer;
        margin-right: 0.5rem;
    }
    
    .menu-toggle:hover {
        background-color: var(--highlight-bg);
    }
    
    .main-navigation ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--card-bg);
        box-shadow: var(--card-shadow);
        padding: 1rem;
        z-index: 100;
        flex-direction: column;
    }
    
    .main-navigation.toggled ul {
        display: flex;
    }
    
    .main-navigation li {
        margin: 0 0 0.75rem 0;
    }
    
    .main-navigation li:last-child {
        margin-bottom: 0;
    }
}

/* Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--header-bg);
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: var(--link-color);
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* AI Dashboard specific styles */
.page-template-page-ai-dashboard .page-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.dashboard-section {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dashboard-section h2 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Stats styling */
.stat-item {
    background-color: var(--ai-output-bg);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--ai-border);
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Recent content list */
.recent-content-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-content-item {
    display: flex;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.content-preview {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    margin-right: 1rem;
    border-radius: 4px;
    overflow: hidden;
}

.content-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-info {
    flex: 1;
}

.content-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.content-meta {
    margin: 0 0 0.75rem 0;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.content-date {
    color: var(--text-color);
    opacity: 0.7;
    margin-left: 0.5rem;
}

/* Plugin form enhancements */
.agc-form-container form {
    margin-top: 1.5rem;
}

.agc-form-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.agc-form-container .form-field {
    margin-bottom: 1.25rem;
}

.agc-form-container .form-field-inline {
    display: flex;
    gap: 1rem;
}

.agc-form-container .form-description {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Response container styling */
.agc-response-container {
    margin-top: 1.5rem;
    border-radius: 8px;
}

.agc-loading {
    padding: 3rem;
    text-align: center;
}

/* Notice styles */
.notice {
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.notice-info {
    background-color: var(--ai-output-bg);
    border: 1px solid var(--ai-border);
}

.notice-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning-color);
}

.notice-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
} 