/**
 * Planika Product Documentation Styles
 * 
 * Styling for documentation tab on WooCommerce product pages.
 */

/* Documentation Tab Container */
.planika-documentation-tab {
    padding: 20px 0;
    font-family: inherit;
}

/* Header Section */
.planika-docs-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.planika-docs-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.planika-docs-description {
    margin: 0;
    font-size: 16px;
    color: #666;
    line-height: 1.5;
}

/* Documents Grid */
.planika-docs-grid {
    display: grid;
    gap: 30px;
}

.planika-docs-group {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.planika-docs-group-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

/* Documents List */
.planika-docs-list {
    display: grid;
    gap: 15px;
}

.planika-doc-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.planika-doc-item:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

/* Document Info */
.planika-doc-info {
    flex: 1;
    margin-right: 15px;
}

.planika-doc-name {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.planika-doc-size {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.planika-doc-description {
    margin: 8px 0 0 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Download Button */
.planika-doc-actions {
    flex-shrink: 0;
}

.planika-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #007cba;
    color: white !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.planika-download-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.planika-download-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.planika-download-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Loading and Error States */
.planika-docs-loading,
.planika-docs-error,
.planika-no-docs {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.planika-docs-loading p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

.planika-docs-error {
    background: #fef2f2;
    border-color: #fecaca;
}

.planika-docs-error p {
    margin: 0;
    color: #dc2626;
    font-weight: 500;
}

.planika-no-docs p {
    margin: 0;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .planika-documentation-tab {
        padding: 15px 0;
    }
    
    .planika-docs-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .planika-docs-header h3 {
        font-size: 20px;
    }
    
    .planika-docs-description {
        font-size: 14px;
    }
    
    .planika-docs-group {
        padding: 15px;
    }
    
    .planika-docs-group-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .planika-doc-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .planika-doc-info {
        margin-right: 0;
    }
    
    .planika-download-btn {
        align-self: flex-start;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .planika-docs-header h3 {
        font-size: 18px;
    }
    
    .planika-docs-description {
        font-size: 13px;
    }
    
    .planika-docs-group {
        padding: 12px;
    }
    
    .planika-doc-item {
        padding: 12px;
    }
    
    .planika-doc-name {
        font-size: 14px;
    }
    
    .planika-doc-size {
        font-size: 12px;
    }
    
    .planika-doc-description {
        font-size: 12px;
    }
}

/* Integration with WooCommerce Tabs */
.woocommerce-tabs .planika-documentation-tab {
    padding-top: 0;
}

/* Loading Animation */
.planika-docs-loading::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: planika-spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

/* Accessibility Improvements */
.planika-download-btn:focus-visible {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .planika-doc-item,
    .planika-download-btn {
        transition: none;
    }
    
    .planika-docs-loading::before {
        animation: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .planika-doc-item {
        border-width: 2px;
    }
    
    .planika-download-btn {
        border: 2px solid currentColor;
    }
}

/* Print Styles */
@media print {
    .planika-download-btn {
        display: none;
    }
    
    .planika-doc-item {
        break-inside: avoid;
    }
} 