/**
 * Depo Stok Takip - Frontend CSS
 * Müşteri Sipariş Takip Sayfası (Modern Soft Tasarım)
 */

/* CSS Variables */
:root {
    --dst-primary: #f59e0b;
    --dst-primary-light: #fbbf24;
    --dst-primary-dark: #d97706;
    --dst-success: #10b981;
    --dst-success-light: #34d399;
    --dst-warning: #f59e0b;
    --dst-danger: #ef4444;
    --dst-info: #3b82f6;
    --dst-purple: #f59e0b;
    --dst-gray-50: #f9fafb;
    --dst-gray-100: #f3f4f6;
    --dst-gray-200: #e5e7eb;
    --dst-gray-300: #d1d5db;
    --dst-gray-400: #9ca3af;
    --dst-gray-500: #6b7280;
    --dst-gray-600: #4b5563;
    --dst-gray-700: #374151;
    --dst-gray-800: #1f2937;
    --dst-gray-900: #111827;
    --dst-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --dst-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --dst-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --dst-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --dst-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --dst-radius: 16px;
    --dst-radius-sm: 8px;
    --dst-radius-lg: 24px;
}

/* Container */
.dst-tracking-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Main Card */
.dst-tracking-form {
    background: #fff;
    border-radius: var(--dst-radius-lg);
    box-shadow: var(--dst-shadow-xl);
    overflow: hidden;
    border: 1px solid var(--dst-gray-100);
}

.dst-tracking-form h2 {
    margin: 0;
    padding: 32px 32px 8px;
    color: var(--dst-gray-900);
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.5px;
}

.dst-tracking-form > p {
    color: var(--dst-gray-500);
    text-align: center;
    margin: 0 32px 28px;
    font-size: 15px;
    line-height: 1.6;
}

/* Search Form */
.dst-search-form {
    padding: 0 32px 32px;
}

.dst-input-group {
    display: flex;
    gap: 12px;
    background: var(--dst-gray-50);
    padding: 8px;
    border-radius: var(--dst-radius);
    border: 2px solid var(--dst-gray-100);
    transition: all 0.3s ease;
}

.dst-input-group:focus-within {
    border-color: var(--dst-primary-light);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.dst-input-group input[type="text"] {
    flex: 1;
    padding: 14px 18px;
    font-size: 15px;
    border: none;
    background: transparent;
    outline: none;
    color: var(--dst-gray-800);
}

.dst-input-group input[type="text"]::placeholder {
    color: var(--dst-gray-400);
}

/* Button */
.dst-btn {
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
}

.dst-btn-primary {
    background: var(--dst-primary);
    color: #fff;
}

.dst-btn-primary:hover {
    background: var(--dst-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.dst-btn-primary:active {
    transform: translateY(0);
}

.dst-btn-primary:disabled {
    background: var(--dst-gray-300);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.dst-btn-text {
    display: inline;
}

.dst-loading {
    display: none;
}

/* Loading Spinner */
.dst-loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: dst-spin 0.7s linear infinite;
}

@keyframes dst-spin {
    to { transform: rotate(360deg); }
}

/* Results */
.dst-tracking-result {
    padding: 0;
}

/* Order Card */
.dst-order-card {
    background: #fff;
    border-radius: var(--dst-radius-lg);
    margin: 20px;
    box-shadow: var(--dst-shadow-lg);
    overflow: hidden;
    animation: dst-fadeIn 0.5s ease-out;
    border: 1px solid var(--dst-gray-100);
}

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

/* Seller Info - Soft Design */
.dst-seller-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    background: linear-gradient(135deg, var(--dst-gray-50) 0%, #fff 100%);
    border-bottom: 1px solid var(--dst-gray-100);
}

.dst-seller-logo {
    max-width: 100px;
    max-height: 45px;
    object-fit: contain;
    border-radius: var(--dst-radius-sm);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.dst-seller-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--dst-gray-700);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dst-seller-name::before {
    content: '';
    width: 3px;
    height: 20px;
    background: var(--dst-primary);
    border-radius: 3px;
}

/* Header içindeki Satıcı Bilgisi */
.dst-header-seller {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    border-radius: var(--dst-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25);
}

.dst-header-seller-logo {
    max-width: 80px;
    max-height: 40px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    padding: 4px 8px;
}

.dst-header-seller-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Order Header - Modern Gradient */
.dst-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 28px 32px;
    background: linear-gradient(135deg, var(--dst-primary) 0%, var(--dst-purple) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.dst-order-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.dst-order-number {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.dst-order-date {
    opacity: 0.85;
    font-size: 13px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dst-order-date::before {
    content: '📅';
    font-size: 12px;
}

/* Current Status Badge */
.dst-current-status {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.2);
    padding: 14px 22px;
    border-radius: var(--dst-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.dst-status-icon-large {
    font-size: 32px;
    line-height: 1;
}

.dst-status-text {
    display: flex;
    flex-direction: column;
}

.dst-status-label-small {
    font-size: 10px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.dst-status-value {
    font-size: 17px;
    font-weight: 700;
    margin-top: 2px;
}

/* Order Details - Clean Grid */
.dst-order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1px;
    background: var(--dst-gray-100);
}

.dst-detail-item {
    padding: 20px 24px;
    background: #fff;
}

.dst-detail-label {
    display: block;
    font-size: 11px;
    color: var(--dst-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    font-weight: 500;
}

.dst-detail-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dst-gray-800);
    line-height: 1.4;
}

/* Piece Count Badge */
.dst-piece-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    color: var(--dst-primary-dark);
    font-weight: 600;
    border: 1px solid #fcd34d;
}

.dst-piece-count::before {
    content: '📦';
    font-size: 14px;
}

/* Section Title */
.dst-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--dst-gray-800);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dst-section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--dst-primary) 0%, var(--dst-purple) 100%);
    border-radius: 4px;
}

/* Progress Section */
.dst-progress-section {
    padding: 32px;
    background: var(--dst-gray-50);
}

.dst-progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 10px;
}

.dst-progress-bar::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 60px;
    right: 60px;
    height: 3px;
    background: var(--dst-gray-200);
    border-radius: 3px;
    z-index: 1;
}

.dst-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.dst-progress-dot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--dst-gray-100);
    border: 3px solid var(--dst-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dst-progress-step.completed .dst-progress-dot {
    background: var(--dst-success);
    border-color: var(--dst-success);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.dst-progress-step.active .dst-progress-dot {
    background: var(--dst-primary);
    border-color: var(--dst-primary);
    color: #fff;
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.25);
    animation: dst-pulse 2s infinite;
}

@keyframes dst-pulse {
    0%, 100% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.25); }
    50% { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0.1); }
}

.dst-progress-step.completed::after {
    content: '';
    position: absolute;
    top: 23px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: var(--dst-success);
    z-index: 0;
}

.dst-progress-step:last-child::after {
    display: none;
}

.dst-progress-label {
    margin-top: 14px;
    font-size: 12px;
    color: var(--dst-gray-400);
    text-align: center;
    max-width: 90px;
    line-height: 1.4;
    font-weight: 500;
}

.dst-progress-step.active .dst-progress-label,
.dst-progress-step.completed .dst-progress-label {
    color: var(--dst-gray-700);
    font-weight: 600;
}

/* History Section - Timeline */
.dst-history-section {
    padding: 32px;
    background: #fff;
}

.dst-timeline {
    position: relative;
    padding-left: 36px;
}

.dst-timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--dst-success) 0%, var(--dst-gray-200) 100%);
    border-radius: 2px;
}

.dst-timeline-item {
    position: relative;
    padding-bottom: 24px;
    animation: dst-slideIn 0.4s ease-out;
}

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

.dst-timeline-item:last-child {
    padding-bottom: 0;
}

.dst-timeline-marker {
    position: absolute;
    left: -36px;
    top: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--dst-success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    z-index: 2;
}

.dst-timeline-marker.pending {
    background: var(--dst-gray-200);
    color: var(--dst-gray-400);
    box-shadow: none;
}

.dst-timeline-content {
    background: var(--dst-gray-50);
    padding: 18px 22px;
    border-radius: var(--dst-radius);
    border: 1px solid var(--dst-gray-100);
    transition: all 0.2s ease;
}

.dst-timeline-content:hover {
    background: #fff;
    border-color: var(--dst-gray-200);
    box-shadow: var(--dst-shadow-md);
}

.dst-timeline-item.pending .dst-timeline-content {
    background: var(--dst-gray-50);
    opacity: 0.6;
}

.dst-timeline-status {
    font-size: 15px;
    font-weight: 600;
    color: var(--dst-gray-800);
    margin-bottom: 4px;
}

.dst-timeline-desc {
    font-size: 13px;
    color: var(--dst-gray-500);
    line-height: 1.5;
}

.dst-timeline-date {
    font-size: 12px;
    color: var(--dst-gray-400);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Transfer Info Badge */
.dst-transfer-info-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.dst-transfer-info-badge .dst-transfer-icon {
    font-size: 20px;
}

.dst-transfer-info-badge strong {
    font-weight: 600;
}

/* Transfer Timeline - 6 adım için */
.dst-progress-bar.transfer-timeline {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.dst-progress-bar.transfer-timeline .dst-progress-step {
    flex: 1;
    min-width: 80px;
}

.dst-progress-bar.transfer-timeline .dst-progress-label {
    font-size: 10px;
    max-width: 80px;
}

/* Notes Section */
.dst-notes-section {
    padding: 24px 32px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-top: 1px solid #fde68a;
}

.dst-notes-text {
    font-size: 14px;
    color: #92400e;
    line-height: 1.6;
    margin: 0;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--dst-radius-sm);
    border-left: 4px solid var(--dst-warning);
}

/* Error Message */
.dst-tracking-error {
    margin: 24px;
    padding: 32px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    border-radius: var(--dst-radius);
    text-align: center;
}

.dst-tracking-error::before {
    content: "😕";
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
}

.dst-tracking-error p {
    margin: 0;
    color: #b91c1c;
    font-size: 15px;
    font-weight: 500;
}

/* Status Colors */
.dst-status-iptal .dst-order-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.dst-status-iade .dst-order-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.dst-status-teslim_edildi .dst-order-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.dst-timeline-item.iptal .dst-timeline-marker {
    background: var(--dst-danger);
}

.dst-timeline-item.iade .dst-timeline-marker {
    background: var(--dst-warning);
}

.dst-progress-step.iptal .dst-progress-dot,
.dst-progress-step.iade .dst-progress-dot {
    background: var(--dst-danger) !important;
    border-color: var(--dst-danger) !important;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .dst-tracking-container {
        padding: 12px;
    }

    .dst-tracking-form h2 {
        font-size: 22px;
        padding: 28px 24px 8px;
    }

    .dst-tracking-form > p {
        margin: 0 24px 24px;
        font-size: 14px;
    }

    .dst-search-form {
        padding: 0 24px 28px;
    }

    .dst-input-group {
        flex-direction: column;
        padding: 6px;
    }

    .dst-input-group input[type="text"] {
        text-align: center;
    }

    .dst-btn {
        width: 100%;
        padding: 16px;
    }

    .dst-order-card {
        margin: 16px;
        border-radius: var(--dst-radius);
    }

    .dst-seller-info {
        padding: 16px 20px;
        flex-direction: column;
        text-align: center;
    }

    .dst-seller-name::before {
        display: none;
    }

    .dst-order-header {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        gap: 16px;
    }

    .dst-current-status {
        width: 100%;
        justify-content: center;
    }

    .dst-order-details {
        grid-template-columns: 1fr 1fr;
    }

    .dst-detail-item {
        padding: 16px 18px;
    }

    /* Progress Mobile - Vertical */
    .dst-progress-section {
        padding: 28px 24px;
    }

    .dst-progress-bar {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 24px;
        gap: 0;
    }

    .dst-progress-bar::before {
        top: 24px;
        bottom: 24px;
        left: 23px;
        right: auto;
        width: 2px;
        height: auto;
    }

    .dst-progress-step {
        flex-direction: row;
        gap: 16px;
        padding: 12px 0;
        width: 100%;
    }

    .dst-progress-step::after {
        display: none !important;
    }

    .dst-progress-dot {
        width: 44px;
        height: 44px;
        font-size: 18px;
        flex-shrink: 0;
    }

    .dst-progress-label {
        margin-top: 0;
        text-align: left;
        max-width: none;
        font-size: 13px;
    }

    /* Timeline Mobile */
    .dst-history-section {
        padding: 24px 20px;
    }

    .dst-timeline {
        padding-left: 32px;
    }

    .dst-timeline::before {
        left: 12px;
    }

    .dst-timeline-marker {
        left: -32px;
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .dst-timeline-content {
        padding: 14px 18px;
    }

    .dst-notes-section {
        padding: 20px 24px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dst-tracking-container {
        /* Dark mode styles can be added here if needed */
    }
}

/* Print Styles */
@media print {
    .dst-tracking-form {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .dst-search-form {
        display: none;
    }

    .dst-order-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .dst-order-header {
        background: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
