/* Palestine Martyrs Plugin - Frontend Styles */

.palestine-martyrs-frontend {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.pm-frontend-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pm-frontend-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.pm-frontend-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.pm-frontend-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    margin: 0;
}

.pm-flag-colors {
    display: flex;
    height: 5px;
    margin-top: 20px;
    border-radius: 3px;
    overflow: hidden;
}

.flag-black { background: #000; flex: 1; }
.flag-white { background: #fff; flex: 1; }
.flag-green { background: #00732f; flex: 1; }
.flag-red { background: #ce1126; flex: 1; }

/* Statistics Cards */
.pm-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.pm-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.pm-stat-card:hover {
    transform: translateY(-5px);
}

.pm-stat-card h3 {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    font-weight: bold;
}

.pm-stat-card p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.pm-stat-card i {
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: block;
}

/* Search and Filter Controls */
.pm-controls-container {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.pm-controls-title {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pm-search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.pm-search-input {
    grid-column: 1 / -1;
}

.pm-input, .pm-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.pm-input:focus, .pm-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pm-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 500;
}

.pm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.pm-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pm-btn-secondary {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    color: white;
}

/* Table Styles */
.pm-table-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.pm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.pm-table th {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 15px 12px;
    text-align: center;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.pm-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
}

.pm-table tbody tr:hover {
    background-color: #f8f9fa;
}

.pm-table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}

/* Pagination */
.pm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.pm-pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pm-pagination button:hover:not(:disabled) {
    background: #667eea;
    color: white;
}

.pm-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pm-pagination .active {
    background: #667eea;
    color: white;
}

/* Loading Indicator */
.pm-loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 15px;
    margin: 20px 0;
}

.pm-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: pm-spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* No Data Message */
.pm-no-data {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 1.2rem;
}

.pm-no-data i {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .palestine-martyrs-frontend {
        padding: 10px;
    }
    
    .pm-frontend-title {
        font-size: 2rem;
    }
    
    .pm-stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pm-search-filters {
        grid-template-columns: 1fr;
    }
    
    .pm-table-container {
        overflow-x: auto;
    }
    
    .pm-table {
        min-width: 600px;
    }
    
    .pm-controls-container {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .pm-frontend-header {
        padding: 20px;
    }
    
    .pm-frontend-title {
        font-size: 1.8rem;
    }
    
    .pm-stats-container {
        grid-template-columns: 1fr;
    }
    
    .pm-stat-card {
        padding: 20px;
    }
    
    .pm-stat-card h3 {
        font-size: 2rem;
    }
}

/* Animation Classes */
.pm-fade-in {
    animation: pmFadeIn 0.5s ease-in;
}

@keyframes pmFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pm-slide-up {
    animation: pmSlideUp 0.3s ease-out;
}

@keyframes pmSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Custom Scrollbar */
.pm-table-container::-webkit-scrollbar {
    height: 8px;
}

.pm-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.pm-table-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.pm-table-container::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Search Results Highlight */
.pm-search-highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Filter Active State */
.pm-filter-active {
    border-color: #667eea !important;
    background-color: #f8f9ff !important;
}

/* Accessibility */
.pm-btn:focus,
.pm-input:focus,
.pm-select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .pm-controls-container,
    .pm-pagination {
        display: none !important;
    }
    
    .pm-frontend-header {
        background: #2c3e50 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
    }
    
    .pm-table th {
        background: #2c3e50 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
    }
    
    .pm-stat-card {
        background: #667eea !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .palestine-martyrs-frontend {
        color: #e9ecef;
    }
    
    .pm-controls-container {
        background: #343a40;
        border-color: #495057;
    }
    
    .pm-input, .pm-select {
        background: #495057;
        border-color: #6c757d;
        color: #e9ecef;
    }
    
    .pm-table-container {
        background: #343a40;
    }
    
    .pm-table td {
        border-color: #495057;
    }
    
    .pm-table tbody tr:hover {
        background-color: #495057;
    }
    
    .pm-table tbody tr:nth-child(even) {
        background-color: #3a4046;
    }
    
    .pm-loading {
        background: #343a40;
    }
}

