/**
 * PPList - DGA Theme
 * Version: 2.0.0
 * Design: DGA Brand Identity
 */

/* CSS Variables */
:root {
    --ppl-orange: #E85826;
    --ppl-orange-light: #FF6B35;
    --ppl-orange-dark: #D84315;
    --ppl-navy: #1E2962;
    --ppl-navy-light: #2C3E7A;
    --ppl-gray-50: #F9FAFB;
    --ppl-gray-100: #F3F4F6;
    --ppl-gray-200: #E5E7EB;
    --ppl-gray-300: #D1D5DB;
    --ppl-gray-400: #9CA3AF;
    --ppl-gray-500: #6B7280;
    --ppl-gray-600: #4B5563;
    --ppl-gray-700: #374151;
    --ppl-gray-800: #1F2937;
    --ppl-gray-900: #111827;
    --ppl-success: #10B981;
    --ppl-warning: #F59E0B;
    --ppl-danger: #EF4444;
    --ppl-radius: 8px;
    --ppl-radius-sm: 6px;
    --ppl-shadow-sm: 0 1px 2px rgba(30, 41, 98, 0.05);
    --ppl-shadow: 0 2px 4px rgba(30, 41, 98, 0.08);
    --ppl-shadow-md: 0 4px 8px rgba(30, 41, 98, 0.12);
    --ppl-shadow-lg: 0 8px 16px rgba(30, 41, 98, 0.15);
    --ppl-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container */
.pplist-container-ppl738 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Sarabun', 'Kanit', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ppl-gray-800);
}

/* Filter Section */
.pplist-filter-section-ppl738 {
    background: white;
    border-radius: var(--ppl-radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--ppl-shadow);
    border: 1px solid var(--ppl-gray-200);
}

/* Search Box */
.pplist-search-box-ppl738 {
    margin-bottom: 16px;
}

.pplist-search-wrapper-ppl738 {
    position: relative;
}

.pplist-search-input-ppl738 {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border: 2px solid var(--ppl-gray-200);
    border-radius: var(--ppl-radius);
    font-size: 16px;
    transition: var(--ppl-transition);
    background: white;
}

.pplist-search-input-ppl738:focus {
    outline: none;
    border-color: var(--ppl-orange);
    box-shadow: 0 0 0 3px rgba(232, 88, 38, 0.1);
}

.pplist-search-btn-ppl738 {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--ppl-orange) 0%, var(--ppl-orange-light) 100%);
    border: none;
    border-radius: var(--ppl-radius-sm);
    color: white;
    cursor: pointer;
    transition: var(--ppl-transition);
    display: flex;
    align-items: center;
}

.pplist-search-btn-ppl738:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 2px 8px rgba(232, 88, 38, 0.3);
}

/* Search Suggestions */
.pplist-search-suggestions-ppl738 {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--ppl-gray-200);
    border-radius: var(--ppl-radius);
    margin-top: 4px;
    box-shadow: var(--ppl-shadow-lg);
    z-index: 100;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.pplist-suggestion-item-ppl738 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: var(--ppl-transition);
    border-bottom: 1px solid var(--ppl-gray-100);
}

.pplist-suggestion-item-ppl738:last-child {
    border-bottom: none;
}

.pplist-suggestion-item-ppl738:hover {
    background: var(--ppl-gray-50);
    color: var(--ppl-orange);
}

.pplist-suggestion-text-ppl738 {
    flex: 1;
    font-size: 14px;
}

/* Filters */
.pplist-filters-ppl738 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.pplist-filter-item-ppl738 {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pplist-filter-label-ppl738 {
    font-size: 14px;
    font-weight: 500;
    color: var(--ppl-gray-600);
}

.pplist-filter-select-ppl738 {
    padding: 10px 12px;
    border: 1px solid var(--ppl-gray-300);
    border-radius: var(--ppl-radius-sm);
    background: white;
    font-size: 14px;
    color: var(--ppl-gray-800);
    cursor: pointer;
    transition: var(--ppl-transition);
}

.pplist-filter-select-ppl738:hover {
    border-color: var(--ppl-gray-400);
}

.pplist-filter-select-ppl738:focus {
    outline: none;
    border-color: var(--ppl-orange);
    box-shadow: 0 0 0 3px rgba(232, 88, 38, 0.1);
}

/* Date Range */
.pplist-date-range-ppl738 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pplist-date-from-ppl738,
.pplist-date-to-ppl738 {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--ppl-gray-300);
    border-radius: var(--ppl-radius-sm);
    font-size: 14px;
    transition: var(--ppl-transition);
}

.pplist-date-from-ppl738:focus,
.pplist-date-to-ppl738:focus {
    outline: none;
    border-color: var(--ppl-orange);
    box-shadow: 0 0 0 3px rgba(232, 88, 38, 0.1);
}

.pplist-date-separator-ppl738 {
    color: var(--ppl-gray-400);
}

/* Clear Filters Button */
.pplist-clear-filters-ppl738 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: white;
    border: 1px solid var(--ppl-gray-300);
    border-radius: var(--ppl-radius-sm);
    color: var(--ppl-gray-600);
    font-size: 14px;
    cursor: pointer;
    transition: var(--ppl-transition);
}

.pplist-clear-filters-ppl738:hover {
    background: var(--ppl-gray-50);
    border-color: var(--ppl-danger);
    color: var(--ppl-danger);
}

/* Summary */
.pplist-summary-ppl738 {
    padding: 12px 0;
    font-size: 14px;
    color: var(--ppl-gray-600);
    display: flex;
    gap: 8px;
}

.pplist-result-count-ppl738 {
    font-weight: 600;
    color: var(--ppl-navy);
}

.pplist-active-filters-ppl738 {
    color: var(--ppl-orange);
}

/* Skeleton Loading */
.pplist-skeleton-ppl738 {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.pplist-skeleton-item-ppl738 {
    background: white;
    border-radius: var(--ppl-radius);
    padding: 20px;
    box-shadow: var(--ppl-shadow);
    border: 1px solid var(--ppl-gray-200);
}

.pplist-skeleton-header-ppl738 {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pplist-skeleton-title-ppl738 {
    height: 20px;
    width: 70%;
    background: linear-gradient(90deg, 
        var(--ppl-gray-200) 25%, 
        var(--ppl-gray-100) 50%, 
        var(--ppl-gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer-ppl738 1.5s infinite;
    border-radius: 4px;
}

.pplist-skeleton-badge-ppl738 {
    height: 20px;
    width: 60px;
    background: linear-gradient(90deg,
        rgba(232, 88, 38, 0.2) 25%,
        rgba(232, 88, 38, 0.1) 50%,
        rgba(232, 88, 38, 0.2) 75%);
    background-size: 200% 100%;
    animation: shimmer-ppl738 1.5s infinite;
    border-radius: 10px;
}

.pplist-skeleton-meta-ppl738 {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.pplist-skeleton-date-ppl738,
.pplist-skeleton-views-ppl738 {
    height: 14px;
    width: 80px;
    background: var(--ppl-gray-200);
    border-radius: 4px;
    animation: shimmer-ppl738 1.5s infinite;
}

.pplist-skeleton-files-ppl738 {
    display: flex;
    gap: 8px;
}

.pplist-skeleton-file-ppl738 {
    height: 32px;
    width: 100px;
    background: var(--ppl-gray-100);
    border-radius: 6px;
    animation: shimmer-ppl738 1.5s infinite;
}

@keyframes shimmer-ppl738 {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Items Container */
.pplist-items-ppl738 {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.pplist-container-ppl738.style-grid .pplist-items-ppl738 {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.pplist-container-ppl738.style-list .pplist-items-ppl738 {
    grid-template-columns: 1fr;
}

/* Item Card */
.pplist-item-ppl738 {
    background: white;
    border-radius: var(--ppl-radius);
    padding: 20px;
    box-shadow: var(--ppl-shadow);
    border: 1px solid var(--ppl-gray-200);
    transition: var(--ppl-transition);
}

.pplist-item-ppl738:hover {
    box-shadow: var(--ppl-shadow-lg);
    transform: translateY(-2px);
    border-color: var(--ppl-orange-light);
}

/* Item Header */
.pplist-item-header-ppl738 {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
    gap: 12px;
}

.pplist-item-title-ppl738 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
}

.pplist-item-link-ppl738 {
    color: var(--ppl-navy);
    text-decoration: none;
    transition: var(--ppl-transition);
}

.pplist-item-link-ppl738:hover {
    color: var(--ppl-orange);
}

.pplist-item-category-ppl738 {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--ppl-orange) 0%, var(--ppl-orange-light) 100%);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* Item Excerpt */
.pplist-item-excerpt-ppl738 {
    color: var(--ppl-gray-600);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Item Meta */
.pplist-item-meta-ppl738 {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--ppl-gray-100);
    border-bottom: 1px solid var(--ppl-gray-100);
    margin-bottom: 12px;
}

.pplist-meta-item-ppl738 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ppl-gray-500);
}

.pplist-meta-item-ppl738 svg {
    opacity: 0.6;
}

.pplist-views-count-ppl738 {
    font-weight: 600;
    color: var(--ppl-navy);
}

/* Item Files */
.pplist-item-files-ppl738 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pplist-file-item-ppl738 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--ppl-gray-50);
    border: 1px solid var(--ppl-gray-200);
    border-radius: var(--ppl-radius-sm);
    color: var(--ppl-gray-700);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ppl-transition);
}

.pplist-file-item-ppl738:hover {
    background: linear-gradient(135deg, var(--ppl-navy) 0%, var(--ppl-navy-light) 100%);
    color: white;
    border-color: var(--ppl-navy);
    transform: translateY(-1px);
}

.pplist-file-name-ppl738 {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pplist-file-date-ppl738 {
    font-size: 11px;
    opacity: 0.7;
}

/* File Icons */
.pplist-icon-pdf-ppl738,
.pplist-icon-word-ppl738,
.pplist-icon-excel-ppl738,
.pplist-icon-ppt-ppl738,
.pplist-icon-zip-ppl738,
.pplist-icon-file-ppl738 {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.pplist-icon-pdf-ppl738 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23DC2626'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E");
}

/* Load More */
.pplist-load-more-wrapper-ppl738 {
    text-align: center;
    margin: 32px 0;
}

.pplist-load-more-ppl738 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--ppl-navy) 0%, var(--ppl-navy-light) 100%);
    color: white;
    border: none;
    border-radius: var(--ppl-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--ppl-transition);
}

.pplist-load-more-ppl738:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 41, 98, 0.3);
}

.pplist-load-more-ppl738.is-loading .pplist-load-more-text-ppl738 {
    display: none;
}

.pplist-load-more-ppl738.is-loading .pplist-load-more-spinner-ppl738 {
    display: flex;
}

.pplist-load-more-spinner-ppl738 {
    display: none;
    gap: 4px;
}

.pplist-load-more-spinner-ppl738 span {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: bounce-ppl738 1.4s ease-in-out infinite;
}

.pplist-load-more-spinner-ppl738 span:nth-child(2) {
    animation-delay: 0.16s;
}

.pplist-load-more-spinner-ppl738 span:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes bounce-ppl738 {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    30% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

/* Empty State */
.pplist-empty-state-ppl738 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--ppl-gray-400);
}

.pplist-empty-state-ppl738 h3 {
    margin: 16px 0 8px;
    font-size: 20px;
    color: var(--ppl-gray-600);
}

.pplist-empty-state-ppl738 p {
    margin: 0;
    font-size: 14px;
}

/* Error State */
.pplist-error-ppl738 {
    padding: 20px;
    background: linear-gradient(135deg,
        rgba(239, 68, 68, 0.1) 0%,
        rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid var(--ppl-danger);
    border-radius: var(--ppl-radius);
    color: var(--ppl-danger);
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .pplist-filters-ppl738 {
        grid-template-columns: 1fr;
    }
    
    .pplist-container-ppl738.style-grid .pplist-items-ppl738 {
        grid-template-columns: 1fr;
    }
    
    .pplist-item-header-ppl738 {
        flex-direction: column;
    }
    
    .pplist-item-meta-ppl738 {
        flex-direction: column;
        gap: 8px;
    }
    
    .pplist-date-range-ppl738 {
        flex-direction: column;
    }
    
    .pplist-date-separator-ppl738 {
        display: none;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .pplist-container-ppl738 {
        color: var(--ppl-gray-200);
    }
    
    .pplist-filter-section-ppl738,
    .pplist-item-ppl738,
    .pplist-search-suggestions-ppl738 {
        background: #1A1A1A;
        border-color: #2D2D2D;
    }
    
    .pplist-search-input-ppl738,
    .pplist-filter-select-ppl738,
    .pplist-date-from-ppl738,
    .pplist-date-to-ppl738 {
        background: #2D2D2D;
        border-color: #3D3D3D;
        color: var(--ppl-gray-200);
    }
    
    .pplist-item-link-ppl738 {
        color: var(--ppl-gray-200);
    }
    
    .pplist-item-excerpt-ppl738,
    .pplist-meta-item-ppl738 {
        color: var(--ppl-gray-400);
    }
}

/* Accessibility */
.pplist-container-ppl738 *:focus-visible {
    outline: 2px solid var(--ppl-orange);
    outline-offset: 2px;
}

/* Print */
@media print {
    .pplist-filter-section-ppl738,
    .pplist-load-more-wrapper-ppl738,
    .pplist-skeleton-ppl738 {
        display: none !important;
    }
    
    .pplist-item-ppl738 {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}