/* INTEGRA FATURA ONAY - Global Styles */

/* AppBar Styles */
.app-bar {
    color: rgba(255, 255, 255, 0.87) !important;
}

.app-bar .mud-text,
.app-bar .mud-chip,
.app-bar .mud-icon-button,
.app-bar .mud-menu button {
    color: rgba(255, 255, 255, 0.87) !important;
}

.app-title {
    color: rgba(255, 255, 255, 0.87) !important;
}

.user-chip {
    color: rgba(255, 255, 255, 0.87) !important;
}

.user-chip .mud-text {
    color: rgba(255, 255, 255, 0.87) !important;
}

/* CSS Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(128, 128, 128, 0.7);
}

/* Selection */
::selection {
    background: var(--mud-palette-primary);
    color: white;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

/* Blazor Error UI */
#blazor-error-ui {
    background: #ffcdd2;
    color: #b71c1c;
    padding: 1rem;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: none;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 1rem;
    padding: 0.25rem 0.5rem;
    background: #b71c1c;
    color: white;
    border: none;
    border-radius: 4px;
}

.blazor-error-boundary {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%23e53935' d='M12 2L1 21h22L12 2zm0 3.99L19.53 19H4.47L12 5.99zM11 10v4h2v-4h-2zm0 6v2h2v-2h-2z'/%3E%3C/svg%3E") no-repeat 1rem center;
    background-size: 2rem;
    border: 1px solid #e53935;
    border-radius: 8px;
    padding: 1rem 1rem 1rem 4rem;
    margin: 1rem;
    color: #b71c1c;
}

.blazor-error-boundary::after {
    content: "Bir hata oluştu. Sayfayı yenileyerek tekrar deneyin.";
}

/* Loading Indicator */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mud-palette-background);
    z-index: 9999;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from { 
        opacity: 0;
        transform: translateX(-20px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out;
}

.animate-slide-left {
    animation: slideInLeft 0.4s ease-out;
}

/* Card Hover Effects */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}

/* Button Styles */
.btn-gradient {
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-primary-darken) 100%) !important;
    transition: all 0.2s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Dark mode glass */
.mud-theme-dark .glass-effect {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Utilities */
@media (max-width: 600px) {
    .hide-on-mobile {
        display: none !important;
    }
}

@media (min-width: 601px) {
    .show-on-mobile {
        display: none !important;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .mud-drawer,
    .mud-appbar {
        display: none !important;
    }
    
    .mud-main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
}

/* Status Colors */
.status-active {
    color: #4caf50;
}

.status-inactive {
    color: #f44336;
}

.status-pending {
    color: #ff9800;
}

/* Data Table Styles */
.data-table-header {
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-primary-darken) 100%);
    color: white;
}

.data-table-row:hover {
    background: var(--mud-palette-action-default-hover);
}

/* Form Field Focus */
.mud-input-outlined.mud-input-adorned-start .mud-input-slot:focus-within {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 2px rgba(var(--mud-palette-primary-rgb), 0.2);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #f44336;
    color: white;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, 
        var(--mud-palette-background-gray) 25%, 
        var(--mud-palette-surface) 50%, 
        var(--mud-palette-background-gray) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Custom Tooltip */
.custom-tooltip {
    background: rgba(0, 0, 0, 0.9) !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
}

/* Progress Bar Custom */
.progress-custom {
    height: 8px !important;
    border-radius: 4px !important;
    overflow: hidden;
}

.progress-custom .mud-progress-linear-bar {
    border-radius: 4px !important;
}

/* Sticky Toolbar */
.sticky-toolbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--mud-palette-background) !important;
    padding: 12px 16px;
    border-bottom: 1px solid var(--mud-palette-divider);
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Pagination left alignment */
.mud-table-pager {
    justify-content: flex-start !important;
}

/* Fatura detay dialog – grid ekrana sığsın, kolonlarda word wrap */
.fatura-detay-dialog .grid-wrapper {
    width: 100%;
    min-width: 0;
    overflow: auto;
}
.fatura-detay-dialog .fatura-detay-grid .dxbl-grid-datacell,
.fatura-detay-dialog .fatura-detay-grid .dxbl-grid-group-cell {
    white-space: normal !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.fatura-detay-dialog .fatura-detay-grid .dxbl-grid-table {
    table-layout: auto;
    width: 100%;
}
