/* Tweller Flow v2 — Client Tracker */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.tf-tracker {
    max-width: 560px;
    margin: 0 auto;
    padding: 40px 24px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── Header ─────────────────────────────────────────── */

.tf-tracker__header {
    text-align: center;
    margin-bottom: 40px;
}

.tf-tracker__header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

.tf-tracker__greeting {
    font-size: 15px;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

.tf-tracker__meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.tf-tracker__meta-item {
    font-size: 13px;
    color: #9CA3AF;
    font-weight: 500;
}

/* ── Stages ─────────────────────────────────────────── */

.tf-tracker__stages {
    position: relative;
    padding: 0;
}

.tf-tracker__stage {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 0 0 32px 0;
    position: relative;
}

.tf-tracker__stage:last-child {
    padding-bottom: 0;
}

/* Connector Line */
.tf-tracker__stage-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 40px;
}

.tf-tracker__stage-line {
    width: 2px;
    flex: 1;
    min-height: 12px;
}

.tf-tracker__stage--completed .tf-tracker__stage-line { background: #10B981; }
.tf-tracker__stage--current .tf-tracker__stage-line:first-child { background: #10B981; }
.tf-tracker__stage--current .tf-tracker__stage-line:last-child { background: #E5E7EB; }
.tf-tracker__stage--upcoming .tf-tracker__stage-line { background: #E5E7EB; }

.tf-tracker__stage:first-child .tf-tracker__stage-line:first-child { background: transparent; }
.tf-tracker__stage:last-child .tf-tracker__stage-line:last-child { background: transparent; }

/* Dot */
.tf-tracker__stage-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
}

.tf-tracker__stage--completed .tf-tracker__stage-dot {
    background: #10B981;
    color: #FFFFFF;
}

.tf-tracker__stage--current .tf-tracker__stage-dot {
    background: #3B82F6;
    color: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.tf-tracker__stage--upcoming .tf-tracker__stage-dot {
    background: #F3F4F6;
    color: #D1D5DB;
}

/* Pulse animation */
.tf-tracker__stage-pulse {
    width: 10px;
    height: 10px;
    background: #FFFFFF;
    border-radius: 50%;
    animation: tf-tracker-pulse 2s infinite;
}

@keyframes tf-tracker-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.8); }
}

/* Content */
.tf-tracker__stage-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    flex: 1;
}

.tf-tracker__stage-icon {
    color: #D1D5DB;
    flex-shrink: 0;
}

.tf-tracker__stage--completed .tf-tracker__stage-icon { color: #10B981; }
.tf-tracker__stage--current .tf-tracker__stage-icon { color: #3B82F6; }

.tf-tracker__stage-info {
    flex: 1;
}

.tf-tracker__stage-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.tf-tracker__stage--completed .tf-tracker__stage-name { color: #059669; }
.tf-tracker__stage--current .tf-tracker__stage-name { color: #2563EB; }
.tf-tracker__stage--upcoming .tf-tracker__stage-name { color: #9CA3AF; }

.tf-tracker__stage-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #DBEAFE;
    color: #1E40AF;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 2px;
}

.tf-tracker__stage-time {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 2px;
}

/* ── Gallery ────────────────────────────────────────── */

.tf-tracker__gallery {
    text-align: center;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 12px;
    padding: 32px;
    margin-top: 32px;
}

.tf-tracker__gallery h3 {
    font-size: 18px;
    font-weight: 700;
    color: #166534;
    margin: 0 0 16px 0;
}

.tf-tracker__gallery-btn {
    display: inline-block;
    padding: 14px 32px;
    background: #10B981;
    color: #FFFFFF;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: background 0.15s;
}

.tf-tracker__gallery-btn:hover {
    background: #059669;
    color: #FFFFFF;
}

/* ── Footer ─────────────────────────────────────────── */

.tf-tracker__footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #F3F4F6;
}

.tf-tracker__code {
    font-size: 13px;
    color: #6B7280;
    margin: 0 0 4px 0;
}

.tf-tracker__code strong {
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: #F3F4F6;
    padding: 2px 8px;
    border-radius: 4px;
    color: #3B82F6;
}

.tf-tracker__refresh {
    font-size: 11px;
    color: #D1D5DB;
    margin: 0;
}

/* ── Lookup Form ────────────────────────────────────── */

.tf-tracker--lookup .tf-tracker__header,
.tf-tracker--error .tf-tracker__header {
    margin-bottom: 24px;
}

.tf-tracker__form {
    max-width: 400px;
    margin: 0 auto;
}

.tf-tracker__input-group {
    display: flex;
    gap: 8px;
}

.tf-tracker__input {
    flex: 1;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 16px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600;
}

.tf-tracker__input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.tf-tracker__btn {
    padding: 12px 24px;
    background: #3B82F6;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.tf-tracker__btn:hover {
    background: #2563EB;
}

/* ── Error State ────────────────────────────────────── */

.tf-tracker--error .tf-tracker__header h2 {
    color: #DC2626;
}
