/* Changelog Plugin Styles */

.changelog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    font-family: inherit;
    color: inherit;
}

/* Search Styles */
.changelog-search-container {
    margin-bottom: 2rem;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#changelog-search {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: #ffffff;
    color: #2c3e50;
}

#changelog-search:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    pointer-events: none;
}

#changelog-search:focus + .search-icon {
    color: #3498db;
}

/* Search Loading Spinner */
.search-loading {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

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

.search-loading.active {
    display: block;
}

/* Changelog Entries */
.changelog-entries {
    margin-bottom: 2rem;
}

.changelog-entry {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.changelog-entry:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.changelog-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.changelog-entry-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.changelog-entry-date {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
}

.changelog-entry-content {
    line-height: 1.6;
    color: #2c3e50;
}

.changelog-entry-content h1,
.changelog-entry-content h2,
.changelog-entry-content h3,
.changelog-entry-content h4,
.changelog-entry-content h5,
.changelog-entry-content h6 {
    color: #2c3e50;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.changelog-entry-content p {
    margin-bottom: 0.75rem;
}

.changelog-entry-content ul,
.changelog-entry-content ol {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

.changelog-entry-content code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.changelog-entry-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0.75rem 0;
}

.changelog-entry-content pre code {
    background: none;
    padding: 0;
}

/* Load More Button */
.changelog-load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.changelog-load-more-btn {
    background: #3498db;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.changelog-load-more-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.changelog-load-more-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* Search Results */
.changelog-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.changelog-search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
    background-color: #f8f9fa;
}

.search-result-item h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.search-result-item p {
    margin: 0;
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.4;
}

.no-results {
    padding: 16px;
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
}

/* Modal Styles */
.changelog-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.changelog-modal.active {
    display: block;
}

.changelog-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.changelog-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
}

.changelog-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.changelog-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.changelog-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.changelog-modal-close:hover {
    background: #f0f0f0;
    color: #2c3e50;
}

.changelog-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-style: italic;
}

/* Error States */
.error {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
    background-color: #fdf2f2;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .changelog-container {
        padding: 1rem;
    }
    
    .changelog-entry {
        padding: 1rem;
    }
    
    .changelog-entry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .changelog-modal-content {
        width: 95%;
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .changelog-container {
        padding: 0.5rem;
    }
    
    .changelog-entry {
        padding: 0.75rem;
    }
    
    .changelog-entry-title {
        font-size: 16px;
    }
    
    .search-result-item {
        padding: 10px 12px;
    }
    
    .search-result-item h4 {
        font-size: 13px;
    }
    
    .search-result-item p {
        font-size: 11px;
    }
}

/* Accessibility */
#changelog-search:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.changelog-load-more-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .changelog-search-container,
    .changelog-load-more-container {
        display: none;
    }
    
    .changelog-entry {
        box-shadow: none;
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}

/* Last Update Styles */
.changelog-last-update {
    margin-bottom: 1rem;
}

.last-update-link {
    color: inherit;
    text-decoration: none;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
    line-height: inherit;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    display: inline;
}

.last-update-link:hover {
    color: inherit;
    text-decoration: underline;
}

.last-update-link:focus {
    outline: none;
    color: inherit;
    text-decoration: underline;
} 