/**
 * KB Order Tracking - Front Styles
 */

/* Container */
.kbot-tracking-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.kbot-tracking-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #333;
}

.kbot-tracking-title .material-icons {
    color: #2fb5d2;
}

/* Horizontal Progress Bar */
.kbot-horizontal .kbot-progress-bar {
    position: relative;
    padding: 20px 0;
}

.kbot-horizontal .kbot-progress-track {
    position: absolute;
    top: 35px;
    left: 5%;
    right: 5%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
}

.kbot-horizontal .kbot-steps-wrapper {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.kbot-horizontal .kbot-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.kbot-horizontal .kbot-step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.kbot-horizontal .kbot-step-circle .material-icons {
    font-size: 24px;
}

.kbot-horizontal .kbot-step-info {
    margin-top: 10px;
}

.kbot-horizontal .kbot-step-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.kbot-horizontal .kbot-step-date {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 3px;
}

.kbot-horizontal .kbot-step-connector {
    position: absolute;
    height: 4px;
    top: 23px;
    border-radius: 2px;
}

.kbot-horizontal .kbot-step.achieved .kbot-step-circle {
    transform: scale(1.1);
}

.kbot-horizontal .kbot-step.current .kbot-step-circle {
    animation: pulse 2s infinite;
}

/* Vertical Timeline */
.kbot-vertical .kbot-timeline {
    position: relative;
    padding-left: 40px;
}

.kbot-vertical .kbot-timeline::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #2fb5d2, #e0e0e0);
    border-radius: 2px;
}

.kbot-vertical .kbot-timeline-item {
    position: relative;
    padding-bottom: 25px;
}

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

.kbot-vertical .kbot-timeline-marker {
    position: absolute;
    left: -40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.kbot-vertical .kbot-timeline-marker .material-icons {
    font-size: 20px;
}

.kbot-vertical .kbot-timeline-content {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-left: 15px;
}

.kbot-vertical .kbot-state-name {
    margin: 0 0 5px;
    font-size: 15px;
    font-weight: 600;
}

.kbot-vertical .kbot-state-desc {
    margin: 0 0 8px;
    font-size: 13px;
    color: #666;
}

.kbot-vertical .kbot-state-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #999;
}

.kbot-vertical .kbot-state-date .material-icons {
    font-size: 14px;
}

.kbot-vertical .kbot-timeline-item.achieved .kbot-timeline-content {
    background: #f0f9f4;
    border-left: 3px solid #4CAF50;
}

.kbot-vertical .kbot-timeline-item.current .kbot-timeline-content {
    background: #e3f2fd;
    border-left: 3px solid #2196F3;
}

/* Tracking Number */
.kbot-tracking-number {
    margin-top: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.kbot-tracking-number strong {
    color: #333;
}

.kbot-tracking-number .btn {
    margin-left: auto;
}

/* History Toggle */
.kbot-history-toggle {
    margin-top: 15px;
    text-align: center;
}

.kbot-history-toggle a {
    color: #2fb5d2;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.kbot-history-details {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* No Tracking */
.kbot-no-tracking {
    text-align: center;
    padding: 30px;
    color: #999;
}

/* Seller Dashboard Styles */
.kbot-seller-tracking {
    padding: 15px 0;
}

.kbot-seller-tracking .kbot-header {
    margin-bottom: 25px;
}

.kbot-seller-tracking .kbot-header h1 {
    font-size: 1.5rem;
    margin: 10px 0;
    color: #333;
}

.kbot-seller-tracking .kbot-filter-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.kbot-seller-tracking .kbot-orders-list .table {
    background: #fff;
}

.kbot-seller-tracking .kbot-orders-list .table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e5e5e5;
    padding: 12px 15px;
}

.kbot-seller-tracking .kbot-orders-list .table td {
    padding: 12px 15px;
    vertical-align: middle;
}

.kbot-seller-tracking .badge {
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 12px;
}

/* Seller Tracking View Page */
.kbot-seller-tracking-view {
    padding: 15px 0;
}

.kbot-seller-tracking-view .kbot-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.kbot-seller-tracking-view .kbot-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
}

.kbot-seller-tracking-view .kbot-header .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Order Info Cards */
.kbot-seller-tracking-view .kbot-order-info {
    margin-bottom: 25px;
}

.kbot-seller-tracking-view .kbot-order-info .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.kbot-seller-tracking-view .kbot-order-info .col-md-6 {
    padding: 0 10px;
}

.kbot-seller-tracking-view .kbot-order-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2fb5d2;
    display: inline-block;
}

.kbot-seller-tracking-view .kbot-order-info .table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.kbot-seller-tracking-view .kbot-order-info .table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    width: 40%;
    padding: 12px 15px;
}

.kbot-seller-tracking-view .kbot-order-info .table td {
    padding: 12px 15px;
    color: #333;
}

/* Tracking Progress Section */
.kbot-seller-tracking-view .kbot-tracking-progress {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid #e5e5e5;
}

.kbot-seller-tracking-view .kbot-tracking-progress h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kbot-seller-tracking-view .kbot-tracking-progress h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #2fb5d2;
    border-radius: 2px;
}

/* Horizontal Progress */
.kbot-seller-tracking-view .kbot-progress-horizontal {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 20px 0;
}

.kbot-seller-tracking-view .kbot-progress-horizontal::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 10%;
    right: 10%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    z-index: 0;
}

.kbot-seller-tracking-view .kbot-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.kbot-seller-tracking-view .kbot-step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    border: 3px solid #fff;
}

.kbot-seller-tracking-view .kbot-progress-step.achieved .kbot-step-icon {
    transform: scale(1.1);
}

.kbot-seller-tracking-view .kbot-progress-step.current .kbot-step-icon {
    animation: pulse 2s infinite;
}

.kbot-seller-tracking-view .kbot-step-label {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    max-width: 100px;
}

.kbot-seller-tracking-view .kbot-step-date {
    margin-top: 4px;
    font-size: 11px;
    color: #888;
}

/* Vertical Timeline */
.kbot-seller-tracking-view .kbot-timeline-vertical {
    position: relative;
    padding-left: 50px;
}

.kbot-seller-tracking-view .kbot-timeline-vertical::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #2fb5d2, #e0e0e0);
    border-radius: 2px;
}

.kbot-seller-tracking-view .kbot-timeline-item {
    position: relative;
    padding-bottom: 25px;
}

.kbot-seller-tracking-view .kbot-timeline-item:last-child {
    padding-bottom: 0;
}

.kbot-seller-tracking-view .kbot-timeline-icon {
    position: absolute;
    left: -50px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    border: 3px solid #fff;
}

.kbot-seller-tracking-view .kbot-timeline-icon i {
    font-size: 18px;
}

.kbot-seller-tracking-view .kbot-timeline-content {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px 20px;
    margin-left: 10px;
    border-left: 3px solid #ddd;
    transition: all 0.3s ease;
}

.kbot-seller-tracking-view .kbot-timeline-item.achieved .kbot-timeline-content {
    background: #f0f9f4;
    border-left-color: #4CAF50;
}

.kbot-seller-tracking-view .kbot-timeline-item.current .kbot-timeline-content {
    background: #e8f4fd;
    border-left-color: #2196F3;
}

.kbot-seller-tracking-view .kbot-timeline-content h4 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.kbot-seller-tracking-view .kbot-timeline-content p {
    margin: 0 0 8px;
    font-size: 13px;
    color: #666;
}

.kbot-seller-tracking-view .kbot-timeline-content small {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #888;
}

/* Update Form Section */
.kbot-seller-tracking-view .kbot-update-form {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid #e5e5e5;
}

.kbot-seller-tracking-view .kbot-update-form h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kbot-seller-tracking-view .kbot-update-form h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #f0ad4e;
    border-radius: 2px;
}

.kbot-seller-tracking-view .kbot-update-form .form-group {
    margin-bottom: 15px;
}

.kbot-seller-tracking-view .kbot-update-form label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 13px;
}

.kbot-seller-tracking-view .kbot-update-form .form-control {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 10px 14px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.kbot-seller-tracking-view .kbot-update-form .form-control:focus {
    border-color: #2fb5d2;
    box-shadow: 0 0 0 3px rgba(47, 181, 210, 0.15);
    outline: none;
}

.kbot-seller-tracking-view .kbot-update-form .btn-primary {
    background: #2fb5d2;
    border-color: #2fb5d2;
    padding: 10px 24px;
    font-weight: 600;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.kbot-seller-tracking-view .kbot-update-form .btn-primary:hover {
    background: #26a3be;
    border-color: #26a3be;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47, 181, 210, 0.3);
}

/* Tracking History Section */
.kbot-seller-tracking-view .kbot-tracking-history {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid #e5e5e5;
}

.kbot-seller-tracking-view .kbot-tracking-history h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kbot-seller-tracking-view .kbot-tracking-history h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #5bc0de;
    border-radius: 2px;
}

.kbot-seller-tracking-view .kbot-tracking-history .table {
    border-radius: 8px;
    overflow: hidden;
}

.kbot-seller-tracking-view .kbot-tracking-history .table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    padding: 12px 15px;
    border-bottom: 2px solid #e5e5e5;
}

.kbot-seller-tracking-view .kbot-tracking-history .table td {
    padding: 12px 15px;
    vertical-align: middle;
}

.kbot-seller-tracking-view .kbot-tracking-history .badge {
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 12px;
}

/* Animation */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(47, 181, 210, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(47, 181, 210, 0); }
    100% { box-shadow: 0 0 0 0 rgba(47, 181, 210, 0); }
}

/* Responsive */
@media (max-width: 768px) {
    .kbot-horizontal .kbot-step-circle {
        width: 40px;
        height: 40px;
    }

    .kbot-horizontal .kbot-step-circle .material-icons {
        font-size: 18px;
    }

    .kbot-horizontal .kbot-step-name {
        font-size: 11px;
    }

    .kbot-vertical .kbot-timeline {
        padding-left: 35px;
    }

    .kbot-vertical .kbot-timeline-marker {
        width: 32px;
        height: 32px;
        left: -35px;
    }

    /* Seller View Responsive */
    .kbot-seller-tracking-view .kbot-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .kbot-seller-tracking-view .kbot-order-info .col-md-6 {
        width: 100%;
    }

    .kbot-seller-tracking-view .kbot-progress-horizontal {
        flex-wrap: wrap;
        gap: 15px;
    }

    .kbot-seller-tracking-view .kbot-progress-horizontal::before {
        display: none;
    }

    .kbot-seller-tracking-view .kbot-progress-step {
        flex: 0 0 45%;
    }

    .kbot-seller-tracking-view .kbot-step-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .kbot-seller-tracking-view .kbot-step-label {
        font-size: 12px;
    }

    .kbot-seller-tracking-view .kbot-update-form .row {
        flex-direction: column;
    }

    .kbot-seller-tracking-view .kbot-update-form .col-md-4 {
        width: 100%;
        margin-bottom: 15px;
    }

    .kbot-seller-tracking-view .kbot-timeline-vertical {
        padding-left: 40px;
    }

    .kbot-seller-tracking-view .kbot-timeline-icon {
        width: 35px;
        height: 35px;
        left: -40px;
    }

    .kbot-seller-tracking-view .kbot-timeline-icon i {
        font-size: 16px;
    }
}
