/**
 * CMS Shipping Frontend Tracker CSS
 */

.aio-frontend-tracker {
    --text-color: #2c3e50;
    --text-muted: #7f8c8d;
    --border-color: #e2e8f0;
    --primary-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --accent-blue: #00f2fe;
    --accent-indigo: #4facfe;
    --accent-green: #2ecc71;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 650px;
    margin: 30px auto;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    color: var(--text-color);
}

.aio-frontend-tracker * {
    box-sizing: border-box;
}

.aio-frontend-tracker h3 {
    margin-top: 0;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.aio-frontend-tracker p.tracker-desc {
    margin: 0 0 25px 0;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}

/* Tracking Input Form */
.aio-track-form-group {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

@media (max-width: 480px) {
    .aio-track-form-group {
        flex-direction: column;
    }
}

.aio-track-form-group input {
    flex-grow: 1;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
    background: #f7fafc;
}

.aio-track-form-group input:focus {
    border-color: var(--accent-indigo);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.15);
}

.aio-track-btn {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(79, 172, 254, 0.3);
}

.aio-track-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(79, 172, 254, 0.45);
}

.aio-track-btn:active {
    transform: translateY(0);
}

.aio-track-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Timeline Components */
.aio-fe-timeline {
    position: relative;
    padding-left: 28px;
    margin: 10px 0;
}

.aio-fe-timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--border-color);
}

.aio-fe-timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.aio-fe-timeline-item:last-child {
    margin-bottom: 0;
}

.aio-fe-timeline-marker {
    position: absolute;
    left: -28px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--text-muted);
    transition: all 0.3s ease;
}

.aio-fe-timeline-item.active .aio-fe-timeline-marker {
    border-color: var(--accent-indigo);
    background: var(--accent-indigo);
    box-shadow: 0 0 8px rgba(79, 172, 254, 0.6);
}

.aio-fe-timeline-info {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.aio-fe-timeline-activity {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 1px;
}

.aio-fe-timeline-location {
    font-size: 13px;
    color: var(--accent-indigo);
    font-weight: 500;
}

/* Loader Animation */
.aio-fe-spinner {
    display: none;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(79, 172, 254, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-indigo);
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Warning Message Card */
.aio-fe-status-card {
    padding: 16px 20px;
    border-left: 4px solid var(--accent-indigo);
    background: #f7fafc;
    border-radius: 0 8px 8px 0;
    margin-top: 10px;
}

.aio-fe-status-title {
    margin: 0 0 6px 0;
    color: var(--accent-indigo);
    font-weight: 600;
    font-size: 14px;
}

.aio-fe-status-desc {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* =========================================================
   Frontend Shipment Summary Card
   ========================================================= */
.aio-fe-summary-card {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.aio-fe-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    flex: 1;
}

.aio-fe-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 90px;
}

.aio-fe-meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.aio-fe-meta-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

/* Status badge */
.aio-fe-current-status {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.aio-fe-delivered { background: #d1fae5; color: #065f46; }
.aio-fe-transit   { background: #dbeafe; color: #1e40af; }
.aio-fe-return    { background: #fee2e2; color: #991b1b; }
.aio-fe-exception { background: #fef3c7; color: #92400e; }
.aio-fe-dispatch  { background: #ede9fe; color: #5b21b6; }
.aio-fe-default   { background: #f1f5f9; color: #475569; }

/* Notices */
.aio-fe-notice {
    padding: 14px 18px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-indigo);
    background: #f0f9ff;
    color: #1e3a5f;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.aio-fe-notice-warn {
    border-left-color: #f59e0b;
    background: #fffbeb;
    color: #78350f;
}

.aio-fe-error {
    color: #dc2626;
    text-align: center;
    font-size: 14px;
    margin-top: 10px;
}

/* Timeline body wrapper */
.aio-fe-timeline-body {
    padding-left: 2px;
}

