/**
 * Gutenberg Blocks Frontend Styles
 * Styles for documentation blocks on the frontend
 *
 * @package WP_Documentation_Pro
 */

/* Documentation List Block */
.wp-block-wp-doc-pro-doc-list {
    margin: 20px 0;
}

.wp-doc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wp-doc-list-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1f2937;
}

.wp-doc-item {
    padding: 16px;
    margin-bottom: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.wp-doc-item:hover {
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wp-doc-item-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.wp-doc-item-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wp-doc-item-title a:hover {
    color: #10b981;
}

.wp-doc-item-excerpt {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.wp-doc-read-more {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.wp-doc-read-more:hover {
    color: #059669;
}

/* Documentation Grid Block */
.wp-doc-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.wp-doc-grid-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.wp-doc-grid-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.wp-doc-grid-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.wp-doc-grid-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.wp-doc-grid-item:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.wp-doc-grid-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
}

.wp-doc-grid-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wp-doc-grid-title a:hover {
    color: #10b981;
}

.wp-doc-grid-excerpt {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.wp-doc-grid-link {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.wp-doc-grid-link:hover {
    color: #059669;
}

/* Documentation Search Block */
.wp-doc-search-wrapper {
    margin: 20px 0;
}

.wp-doc-search-form {
    display: flex;
    gap: 8px;
}

.wp-doc-search-field {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.wp-doc-search-field:focus {
    border-color: #10b981;
}

.wp-doc-search-button {
    padding: 12px 24px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wp-doc-search-button:hover {
    background: #059669;
}

/* Documentation Categories Block */
.wp-doc-categories {
    margin: 20px 0;
}

.wp-doc-categories-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1f2937;
}

.wp-doc-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.wp-doc-category-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.wp-doc-category-item:hover {
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wp-doc-category-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1f2937;
}

.wp-doc-category-icon {
    font-size: 20px;
}

.wp-doc-category-name {
    font-weight: 500;
}

.wp-doc-category-count {
    color: #6b7280;
    font-size: 14px;
    margin-left: auto;
}

/* Table of Contents Block */
.wp-doc-toc {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.wp-doc-toc-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #1f2937;
}

.wp-doc-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wp-doc-toc-item {
    margin-bottom: 8px;
}

.wp-doc-toc-item a {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
    display: block;
    padding: 4px 0;
}

.wp-doc-toc-item a:hover {
    color: #10b981;
}

.wp-doc-toc-level-2 {
    padding-left: 0;
}

.wp-doc-toc-level-3 {
    padding-left: 20px;
}

.wp-doc-toc-level-4 {
    padding-left: 40px;
}

/* Breadcrumb Block */
.wp-doc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
    font-size: 14px;
    color: #6b7280;
}

.wp-doc-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wp-doc-breadcrumb a:hover {
    color: #10b981;
}

.wp-doc-breadcrumb .separator {
    color: #d1d5db;
}

.wp-doc-breadcrumb .current {
    color: #1f2937;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .wp-doc-grid-columns-2,
    .wp-doc-grid-columns-3,
    .wp-doc-grid-columns-4 {
        grid-template-columns: 1fr;
    }
    
    .wp-doc-search-form {
        flex-direction: column;
    }
    
    .wp-doc-categories-grid {
        grid-template-columns: 1fr;
    }
}
