/* Main Container */
.smd-tracking-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Form Styles */
.smd-tracking-form {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.smd-tracking-form h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 24px;
}

.smd-tracking-input-group {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 10px;
}

.smd-tracking-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.smd-tracking-button {
    padding: 15px 30px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.smd-tracking-button:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

/* Results Container */
.smd-tracking-results {
    display: none;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tracking Timeline */
.smd-tracking-timeline {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.tracking-id {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.tracking-id span {
    color: #667eea;
}

.status-badge {
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.status-pending { background: #ffc107; color: #856404; }
.status-in-transit { background: #17a2b8; color: white; }
.status-in-process { background: #007bff; color: white; }
.status-delivered { background: #28a745; color: white; }
.status-cancelled { background: #dc3545; color: white; }
.status-picked-up { background: #6f42c1; color: white; }

/* Timeline Steps */
.timeline-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 40px 0;
}

.timeline-steps::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-icon {
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.step.active .step-icon {
    background: #667eea;
    color: white;
    box-shadow: 0 0 0 5px rgba(102, 126, 234, 0.2);
}

.step.completed .step-icon {
    background: #28a745;
    color: white;
}

.step-label {
    font-weight: bold;
    margin-bottom: 5px;
}

.step-date {
    font-size: 12px;
    color: #999;
}

/* Progress Bar */
.progress-bar-container {
    background: #f0f0f0;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Info Cards Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.info-card h4 {
    color: #667eea;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 18px;
}

.info-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.info-label {
    font-weight: bold;
    width: 140px;
    color: #666;
}

.info-value {
    flex: 1;
    color: #333;
}

/* Location Map */
.location-map {
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.map-placeholder {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    border: 1px dashed #dee2e6;
    border-radius: 10px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.print-button, .download-pdf-button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.print-button {
    background: #6c5ce7;
    color: white;
}

.download-pdf-button {
    background: #00b894;
    color: white;
}

.print-button:hover, .download-pdf-button:hover {
    transform: translateY(-2px);
    filter: brightness(110%);
}

/* Loading Spinner */
.smd-loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.smd-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .smd-tracking-input-group {
        flex-direction: column;
    }
    
    .timeline-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .timeline-steps::before {
        display: none;
    }
    
    .step {
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    .step-icon {
        margin: 0;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-row {
        flex-direction: column;
    }
    
    .info-label {
        width: auto;
        margin-bottom: 5px;
    }
}

/* Print Styles */
@media print {
    .smd-tracking-form,
    .action-buttons,
    .print-button,
    .download-pdf-button {
        display: none !important;
    }
    
    .smd-tracking-container {
        padding: 0;
    }
    
    .info-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* SKR Receipt Specific Styles */
.skr-receipt {
    max-width: 800px;
    margin: 0 auto;
    background: white;
}

.skr-header {
    text-align: center;
    padding: 20px;
    border-bottom: 2px solid #333;
    margin-bottom: 20px;
}

.skr-logo {
    max-width: 200px;
    margin-bottom: 15px;
}

.skr-title {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.skr-declaration {
    background: #f8f9fa;
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid #667eea;
    font-style: italic;
}

.skr-signature {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
}


/* Additional styles for templates */

/* Card Styles */
.info-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header .card-icon {
    font-size: 20px;
}

.card-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Packages Table */
.packages-table, .goods-table {
    width: 100%;
    border-collapse: collapse;
}

.packages-table th, .goods-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
}

.packages-table td, .goods-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.total-row {
    background: #f8f9fa;
    font-weight: bold;
}

/* Payment Status */
.payment-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.payment-status.paid, .payment-status.completed {
    background: #d4edda;
    color: #155724;
}

.payment-status.pending {
    background: #fff3cd;
    color: #856404;
}

/* Mode Badge */
.mode-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e7f3ff;
    color: #004085;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Delivery Stops */
.delivery-stops {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 20px;
}

.stop {
    text-align: center;
}

.stop-icon {
    width: 50px;
    height: 50px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.stop.completed .stop-icon {
    background: #28a745;
    color: white;
}

.stop.active .stop-icon {
    background: #667eea;
    color: white;
    animation: pulse 1.5s infinite;
}

.stop-line {
    width: 100px;
    height: 2px;
    background: #e0e0e0;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

/* Full Width Card */
.info-card.full-width {
    grid-column: 1 / -1;
}

/* View Map Button */
.view-map {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
    text-decoration: underline;
}

.view-map:hover {
    color: #764ba2;
}

/* Share Button */
.share-button {
    background: #17a2b8;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.share-button:hover {
    background: #138496;
    transform: translateY(-2px);
}

/* Status Timeline */
.status-timeline {
    position: relative;
    padding-left: 30px;
}

.status-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-dot {
    position: absolute;
    left: -30px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #e0e0e0;
}

.timeline-item.completed .timeline-dot {
    background: #28a745;
    box-shadow: 0 0 0 2px #28a745;
}

.timeline-content h5 {
    margin: 0 0 5px;
    font-size: 14px;
}

.timeline-content p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

/* Help Section */
.help-section {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
}

.help-section a {
    color: #667eea;
    text-decoration: none;
}

.help-section a:hover {
    text-decoration: underline;
}