/* Premium Tables - Frontend Styles */

/* Genel Tablo Container */
.premium-table-container {
    margin: 20px 0;
    overflow-x: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    background: #ffffff;
}

/* Arama Container */
.table-search-container {
    padding: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px 8px 0 0;
}

.table-search {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 25px;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #9ca3af;
    pointer-events: none;
}

.search-results {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

/* Ana Tablo Stili */
.premium-table {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color, #1f2937);
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

/* Başlık Stilleri */
.premium-table thead th {
    background: var(--primary-color, #3b82f6) !important;
    color: var(--header-text-color, #ffffff) !important;
    font-weight: 600;
    text-align: left;
    padding: 16px;
    border: none;
    position: relative;
    font-size: 15px;
    letter-spacing: 0.025em;
}

/* Gradient Başlık */
.premium-table .gradient {
    background: linear-gradient(135deg, var(--primary-color, #3b82f6) 0%, var(--secondary-color, #1e40af) 100%) !important;
}

/* Solid Başlık */
.premium-table .solid {
    background: var(--primary-color, #3b82f6) !important;
}

/* Minimal Başlık */
.premium-table .minimal {
    background: transparent !important;
    color: var(--text-color, #1f2937) !important;
    border-bottom: 2px solid var(--primary-color, #3b82f6) !important;
}

/* Tablo Gövdesi */
.premium-table tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    color: var(--text-color, #1f2937);
    vertical-align: top;
    transition: all 0.2s ease;
}

/* Son satır kenarlığı kaldır */
.premium-table tbody tr:last-child td {
    border-bottom: none;
}

/* Satır Hover Efekti */
.premium-table.row-hover tbody tr:hover {
    background-color: var(--hover-color, #f3f4f6) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Çizgili Satırlar */
.premium-table.stripe-rows tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Tema Stilleri */

/* Modern Tema */
.premium-table.modern {
    border: 1px solid var(--border-color, #e5e7eb);
}

.premium-table.modern thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.premium-table.modern tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

/* Elegant Tema */
.premium-table.elegant {
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.premium-table.elegant thead th {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ffffff;
    font-weight: 500;
    position: relative;
}

.premium-table.elegant thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #2ecc71, #3498db);
}

.premium-table.elegant tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.premium-table.elegant tbody tr:hover {
    background: linear-gradient(90deg, rgba(52, 73, 94, 0.05) 0%, rgba(44, 62, 80, 0.05) 100%);
}

/* Colorful Tema */
.premium-table.colorful {
    border: none;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    padding: 2px;
}

.premium-table.colorful table {
    background: #ffffff;
    border-radius: 6px;
}

.premium-table.colorful thead th {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.premium-table.colorful tbody tr:nth-child(odd) {
    background: linear-gradient(90deg, rgba(255, 107, 107, 0.05) 0%, rgba(238, 90, 36, 0.05) 100%);
}

.premium-table.colorful tbody tr:hover {
    background: linear-gradient(90deg, rgba(255, 107, 107, 0.15) 0%, rgba(238, 90, 36, 0.15) 100%);
    transform: scale(1.01);
}

/* Dark Tema */
.premium-table.dark {
    background: #1a1a1a;
    color: #e5e5e5;
    border: 1px solid #333;
}

.premium-table.dark thead th {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: #ffffff;
    border-bottom: 2px solid #4a5568;
}

.premium-table.dark tbody td {
    border-bottom: 1px solid #333;
    color: #e5e5e5;
}

.premium-table.dark tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.premium-table.dark.stripe-rows tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Corporate Tema */
.premium-table.corporate {
    border: 2px solid #e2e8f0;
    background: #ffffff;
}

.premium-table.corporate thead th {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.5px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.premium-table.corporate thead th:last-child {
    border-right: none;
}

.premium-table.corporate tbody td {
    border-right: 1px solid #e2e8f0;
    font-weight: 500;
}

.premium-table.corporate tbody td:last-child {
    border-right: none;
}

.premium-table.corporate tbody tr:hover {
    background: linear-gradient(90deg, rgba(30, 58, 138, 0.05) 0%, rgba(30, 64, 175, 0.05) 100%);
}

/* Animasyonlar */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* Satır Animasyonları */
.premium-table.animate-rows tbody tr {
    animation: fadeIn 0.6s ease-out;
    animation-fill-mode: both;
}

.premium-table.animate-rows tbody tr:nth-child(1) { animation-delay: 0.1s; }
.premium-table.animate-rows tbody tr:nth-child(2) { animation-delay: 0.2s; }
.premium-table.animate-rows tbody tr:nth-child(3) { animation-delay: 0.3s; }
.premium-table.animate-rows tbody tr:nth-child(4) { animation-delay: 0.4s; }
.premium-table.animate-rows tbody tr:nth-child(5) { animation-delay: 0.5s; }
.premium-table.animate-rows tbody tr:nth-child(6) { animation-delay: 0.6s; }
.premium-table.animate-rows tbody tr:nth-child(7) { animation-delay: 0.7s; }
.premium-table.animate-rows tbody tr:nth-child(8) { animation-delay: 0.8s; }
.premium-table.animate-rows tbody tr:nth-child(9) { animation-delay: 0.9s; }
.premium-table.animate-rows tbody tr:nth-child(10) { animation-delay: 1.0s; }

/* Responsive Tasarım */
@media (max-width: 768px) {
    .premium-table-container {
        margin: 10px 0;
        border-radius: 4px;
    }
    
    .premium-table {
        font-size: 12px;
    }
    
    .premium-table thead th,
    .premium-table tbody td {
        padding: 12px 8px;
    }
    
    .premium-table thead th {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .premium-table thead th,
    .premium-table tbody td {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .premium-table thead th {
        font-size: 10px;
    }
}

/* Gölge Efektleri */
.premium-table-container.shadow-light {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.premium-table-container.shadow-medium {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.premium-table-container.shadow-strong {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Özel Durumlar */
.premium-table tbody tr.highlight {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-left: 4px solid #22c55e;
}

.premium-table tbody tr.warning {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    border-left: 4px solid #f59e0b;
}

.premium-table tbody tr.error {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-left: 4px solid #ef4444;
}

/* Loading State */
.premium-table.loading {
    opacity: 0.6;
    pointer-events: none;
}

.premium-table.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color, #3b82f6);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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