/**
 * Parcel Tracker — WoodMart / Nasminc Theme Integration
 */

.pw-tracking-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    color: #1a1a2e;
}

.pw-tracker-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 24px;
    color: #1a1a2e;
    letter-spacing: -0.02em;
}

/* Search Bar */
.pw-search-group {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.pw-search-input {
    flex: 1;
    padding: 14px 18px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #1a1a2e;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pw-search-input::placeholder {
    color: #94a3b8;
}

.pw-search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pw-search-button {
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    font-weight: 600;
    font-size: 15px;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.pw-search-button:hover {
    background-color: #1d4ed8;
}

.pw-search-button:active {
    transform: scale(0.98);
}

.pw-search-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Tracking Info Summary Card */
.pw-tracking-info {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pw-tracking-info p {
    margin: 6px 0;
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}

.pw-tracking-info p strong {
    color: #1a1a2e;
    font-weight: 600;
}

/* Error / loading states */
.pw-error {
    color: #dc2626;
    background: #fef2f2;
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    font-size: 14px;
    font-weight: 500;
}

.pw-loading {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-size: 14px;
}

.pw-no-milestones {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-size: 14px;
}

/* Vertical Timeline */
.pw-timeline {
    position: relative;
    padding-left: 32px;
    margin: 0;
    list-style: none;
}

/* Vertical connecting line */
.pw-timeline::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 11px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(
        to bottom,
        #22c55e 0%,
        #22c55e var(--pw-pct-completed, 0%),
        #e2e8f0 var(--pw-pct-completed, 0%),
        #e2e8f0 100%
    );
}

/* Individual step */
.pw-step {
    position: relative;
    margin-bottom: 28px;
    padding-bottom: 4px;
}

.pw-step:last-child {
    margin-bottom: 0;
}

/* Dot indicator */
.pw-step::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid #cbd5e1;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Step text */
.pw-step-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 3px;
    line-height: 1.3;
}

.pw-step-description {
    font-size: 13.5px;
    color: #64748b;
    margin: 0 0 4px;
    line-height: 1.5;
}

.pw-step-meta {
    font-size: 12.5px;
    color: #94a3b8;
    font-weight: 500;
}

/* --- STATE: Completed --- */
.pw-step.completed::before {
    background: #22c55e;
    border-color: #22c55e;
}

.pw-step.completed .pw-step-title {
    color: #1a1a2e;
}

/* --- STATE: Active (pulsing blue) --- */
@keyframes pw-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35); }
    70%  { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.pw-step.active::before {
    background: #2563eb;
    border-color: #2563eb;
    animation: pw-pulse 2s infinite;
}

.pw-step.active .pw-step-title {
    color: #2563eb;
}

/* --- STATE: Pending --- */
.pw-step.pending::before {
    background: #ffffff;
    border-color: #e2e8f0;
}

.pw-step.pending .pw-step-title {
    color: #94a3b8;
}

.pw-step.pending .pw-step-description {
    color: #cbd5e1;
}

.pw-step.pending .pw-step-meta {
    color: #cbd5e1;
}

/* Responsive */
@media (max-width: 640px) {
    .pw-search-group {
        flex-direction: column;
    }

    .pw-search-button {
        width: 100%;
        text-align: center;
    }

    .pw-tracking-info {
        padding: 16px 18px;
    }

    .pw-timeline {
        padding-left: 28px;
    }
}
