/**
 * NAKLIYE NET - Component Library
 * Reusable UI components with modern design
 */

/* ============================================
   1. PREMIUM CARDS
   ============================================ */

.premium-card {
    position: relative;
    background: white;
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.premium-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.premium-card-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.premium-card-gradient-border {
    position: relative;
    padding: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-2xl);
}

.premium-card-gradient-border .card-inner {
    background: white;
    border-radius: calc(var(--radius-2xl) - 2px);
    padding: var(--space-8);
}

/* ============================================
   2. STAT COUNTERS
   ============================================ */

.stat-counter {
    text-align: center;
}

.stat-counter-value {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    font-family: var(--font-display);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-2);
}

.stat-counter-label {
    font-size: var(--text-sm);
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    font-weight: var(--font-semibold);
}

.stat-counter-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xl);
    background: var(--gradient-primary);
    color: white;
    font-size: 32px;
}

/* ============================================
   3. BADGES
   ============================================ */

.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

.badge-primary {
    background: var(--primary-50);
    color: var(--primary-700);
}

.badge-success {
    background: var(--success-50);
    color: var(--success-700);
}

.badge-warning {
    background: var(--warning-50);
    color: var(--warning-700);
}

.badge-danger {
    background: var(--danger-50);
    color: var(--danger-700);
}

.badge-gradient {
    background: var(--gradient-primary);
    color: white;
}

.badge-dot {
    position: relative;
    padding-left: calc(var(--space-3) + 8px);
}

.badge-dot::before {
    content: '';
    position: absolute;
    left: var(--space-2);
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ============================================
   4. PRICE TAGS
   ============================================ */

.price-tag {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
}

.price-tag-amount {
    font-size: var(--text-4xl);
    font-weight: var(--font-extrabold);
    font-family: var(--font-display);
    line-height: 1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-tag-currency {
    font-size: var(--text-2xl);
    margin-left: var(--space-1);
}

.price-tag-label {
    font-size: var(--text-sm);
    color: var(--gray-600);
    margin-top: var(--space-1);
}

/* ============================================
   5. PROGRESS RINGS
   ============================================ */

.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-ring-circle {
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.progress-ring-bg {
    fill: none;
    stroke: var(--gray-200);
    stroke-width: 8;
}

.progress-ring-progress {
    fill: none;
    stroke: url(#gradient-progress);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    font-family: var(--font-display);
}

/* ============================================
   6. FILTER SIDEBAR
   ============================================ */

.filter-sidebar {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
}

.filter-section {
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--gray-200);
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--gray-900);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    margin-bottom: var(--space-3);
}

.filter-option {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) 0;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-option:hover {
    padding-left: var(--space-2);
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--gray-300);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-option input[type="checkbox"]:checked {
    background: var(--gradient-primary);
    border-color: var(--primary-500);
}

/* Range slider */
.range-slider {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    position: relative;
}

.range-slider-track {
    position: absolute;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.range-slider-thumb {
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid var(--primary-500);
    border-radius: 50%;
    cursor: pointer;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.range-slider-thumb:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

/* ============================================
   7. MODAL & OVERLAY
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.modal-content {
    background: white;
    border-radius: var(--radius-2xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    position: relative;
}

.modal-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    font-family: var(--font-display);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-200);
    transform: rotate(90deg);
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    padding: var(--space-6);
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
}

/* ============================================
   8. TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-tooltip);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.toast {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-success .toast-icon {
    background: var(--success-100);
    color: var(--success-600);
}

.toast-error .toast-icon {
    background: var(--danger-100);
    color: var(--danger-600);
}

.toast-warning .toast-icon {
    background: var(--warning-100);
    color: var(--warning-600);
}

.toast-info .toast-icon {
    background: var(--primary-100);
    color: var(--primary-600);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-1);
}

.toast-message {
    font-size: var(--text-xs);
    color: var(--gray-600);
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.toast-close:hover {
    opacity: 1;
}

/* ============================================
   9. MAP PREVIEW
   ============================================ */

.map-preview {
    position: relative;
    height: 300px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--gray-100);
}

.map-route-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.6) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

.map-location-marker {
    background: white;
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
}

.map-route-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(
        to right,
        white 0%,
        white 50%,
        transparent 50%
    );
    background-size: 20px 2px;
    margin: 0 var(--space-4);
}

/* ============================================
   10. SKELETON LOADERS
   ============================================ */

.skeleton-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
}

.skeleton-line {
    height: 16px;
    background: var(--gray-200);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-3);
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-line-short {
    width: 60%;
}

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gray-200);
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-avatar {
    width: 64px;
    height: 64px;
}

/* ============================================
   11. EMPTY STATES
   ============================================ */

.empty-state {
    text-align: center;
    padding: var(--space-16) var(--space-6);
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-6);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-400);
    font-size: 64px;
}

.empty-state-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-2);
}

.empty-state-message {
    font-size: var(--text-base);
    color: var(--gray-600);
    margin-bottom: var(--space-6);
}

/* ============================================
   12. RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 768px) {
    .premium-card {
        padding: var(--space-6);
    }

    .toast-container {
        left: var(--space-4);
        right: var(--space-4);
    }

    .toast {
        min-width: auto;
    }

    .modal-content {
        margin: var(--space-4);
    }
}
