/* Tweller Flow Client Tracker */

.tf-tracker {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1d2327;
}

/* Header */
.tf-tracker__header {
    text-align: center;
    margin-bottom: 40px;
}
.tf-tracker__header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}
.tf-tracker__greeting {
    font-size: 16px;
    color: #555;
    margin-bottom: 16px;
}
.tf-tracker__meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
}
.tf-tracker__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Lookup Form */
.tf-tracker__form {
    margin-top: 24px;
}
.tf-tracker__input-group {
    display: flex;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
}
.tf-tracker__input {
    flex: 1;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
    letter-spacing: 2px;
    font-weight: 600;
}
.tf-tracker__input:focus {
    border-color: #2c3e50;
}
.tf-tracker__btn {
    padding: 14px 28px;
    background: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.tf-tracker__btn:hover {
    background: #34495e;
}

/* Stages */
.tf-tracker__stages {
    margin: 32px 0;
}

.tf-tracker__stage {
    display: flex;
    gap: 16px;
    min-height: 80px;
}

/* Connector (line + dot) */
.tf-tracker__stage-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40px;
    flex-shrink: 0;
}
.tf-tracker__stage-line {
    flex: 1;
    width: 3px;
    background: #e0e0e0;
    min-height: 8px;
}
.tf-tracker__stage:first-child .tf-tracker__stage-line:first-child { visibility: hidden; }
.tf-tracker__stage:last-child .tf-tracker__stage-line:last-child { visibility: hidden; }

.tf-tracker__stage-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

/* Completed stage */
.tf-tracker__stage--completed .tf-tracker__stage-line { background: #27ae60; }
.tf-tracker__stage--completed .tf-tracker__stage-dot { background: #27ae60; color: #fff; }

/* Current stage */
.tf-tracker__stage--current .tf-tracker__stage-connector .tf-tracker__stage-line:first-child { background: #27ae60; }
.tf-tracker__stage--current .tf-tracker__stage-dot {
    background: #2c3e50;
    box-shadow: 0 0 0 6px rgba(44, 62, 80, 0.15);
}
.tf-tracker__stage-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    animation: tf-pulse 2s infinite;
}

@keyframes tf-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Stage content */
.tf-tracker__stage-content {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    flex: 1;
}
.tf-tracker__stage-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 10px;
    color: #888;
    flex-shrink: 0;
}
.tf-tracker__stage--completed .tf-tracker__stage-icon { background: #d4edda; color: #27ae60; }
.tf-tracker__stage--current .tf-tracker__stage-icon { background: #2c3e50; color: #fff; }

.tf-tracker__stage-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #333;
}
.tf-tracker__stage--upcoming .tf-tracker__stage-name { color: #aaa; }
.tf-tracker__stage--current .tf-tracker__stage-name { color: #2c3e50; }

.tf-tracker__stage-badge {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 10px;
    background: #2c3e50;
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tf-tracker__stage-time {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    display: block;
}

/* Gallery CTA */
.tf-tracker__gallery {
    text-align: center;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 12px;
    padding: 32px;
    margin: 24px 0;
    color: #fff;
}
.tf-tracker__gallery h3 {
    margin: 0 0 16px 0;
    font-size: 22px;
}
.tf-tracker__gallery-btn {
    display: inline-block;
    padding: 14px 32px;
    background: #fff;
    color: #27ae60;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.tf-tracker__gallery-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #27ae60;
}

/* Footer */
.tf-tracker__footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #999;
}
.tf-tracker__code { font-size: 12px; }
.tf-tracker__refresh { font-size: 11px; color: #bbb; }

/* Error state */
.tf-tracker--error .tf-tracker__header h2 { color: #c0392b; }

/* Mobile responsive */
@media (max-width: 480px) {
    .tf-tracker { padding: 16px; }
    .tf-tracker__header h2 { font-size: 22px; }
    .tf-tracker__input-group { flex-direction: column; }
    .tf-tracker__meta { flex-direction: column; gap: 8px; }
    .tf-tracker__stage-content { gap: 8px; }
    .tf-tracker__stage-icon { width: 32px; height: 32px; }
    .tf-tracker__stage-name { font-size: 14px; }
}
