/* Frontend Styles for WooCommerce Product Documentation */

/* Zakładka dokumentacji na stronie produktu */
.wpd-documentation-tab {
    padding: 20px 0;
}

.wpd-documents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wpd-document-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.wpd-document-item:hover {
    background: #f0f0f0;
    border-color: #d0d0d0;
    transform: translateX(4px);
}

.wpd-pdf-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.wpd-document-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    flex: 1;
}

.wpd-document-link:hover {
    color: #dc2626;
}

/* Katalog dokumentacji */
.wpd-catalog-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Wyszukiwarka */
.wpd-search-container {
    margin-bottom: 30px;
}

.wpd-search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
}

.wpd-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s ease;
}

.wpd-search-input:focus {
    outline: none;
    border-color: #2271b1;
}

.wpd-search-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #2271b1;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wpd-search-button:hover {
    background: #135e96;
}

.wpd-search-button svg {
    width: 18px;
    height: 18px;
}

/* Wyniki wyszukiwania */
.wpd-search-results {
    background: #fff;
    border: 2px solid #2271b1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.wpd-search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
}

.wpd-search-results-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.wpd-clear-search {
    padding: 8px 16px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.wpd-clear-search:hover {
    background: #b91c1c;
}

.wpd-search-results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wpd-search-result-item {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

.wpd-result-product {
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
}

.wpd-result-product strong {
    color: #2271b1;
}

.wpd-variants {
    color: #666;
    font-size: 14px;
    font-style: italic;
}

.wpd-result-document {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpd-result-document a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.wpd-result-document a:hover {
    color: #dc2626;
}

.wpd-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Katalog - siatka 2 kolumny */
.wpd-catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.wpd-catalog-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.wpd-catalog-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wpd-catalog-header {
    padding: 18px 20px;
    background: #f9f9f9;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.wpd-catalog-header:hover {
    background: #f0f0f0;
}

.wpd-product-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.wpd-toggle-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.wpd-catalog-item.active .wpd-toggle-icon {
    transform: rotate(180deg);
}

.wpd-catalog-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.wpd-catalog-item.active .wpd-catalog-content {
    max-height: 1000px;
}

.wpd-catalog-content .wpd-documents-list {
    padding: 15px 20px 20px;
}

.wpd-no-documents {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Responsywność */
@media (max-width: 768px) {
    .wpd-catalog-grid {
        grid-template-columns: 1fr;
    }
    
    .wpd-search-form {
        flex-direction: column;
    }
    
    .wpd-search-button {
        justify-content: center;
    }
    
    .wpd-search-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .wpd-product-title {
        font-size: 15px;
    }
    
    .wpd-document-link {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .wpd-catalog-wrapper {
        padding: 10px;
    }
    
    .wpd-catalog-header {
        padding: 15px;
    }
    
    .wpd-catalog-content .wpd-documents-list {
        padding: 12px 15px 15px;
    }
    
    .wpd-document-item {
        padding: 10px 12px;
    }
}
