/**
 * Progress Tracker Styles
 * Pet grooming progress tracking - Pizza Tracker style
 *
 * @since 2.0.86
 */

/* Container */
.quickcal-progress-tracker {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 24px;
    overflow: hidden;
}

/* Header */
.progress-tracker-header {
    text-align: center;
    margin-bottom: 28px;
}

.progress-tracker-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.progress-tracker-header h3 .paw-icon {
    color: #56C477;
}

.progress-tracker-meta {
    font-size: 14px;
    color: #666;
}

.progress-tracker-meta span {
    display: inline-block;
}

.progress-tracker-meta span + span::before {
    content: "\2022";
    margin: 0 8px;
    color: #ccc;
}

/* Stepper Container */
.progress-stepper {
    position: relative;
    padding: 20px 0;
    margin-bottom: 20px;
}

/* Progress Line (background) */
.progress-stepper-line {
    position: absolute;
    top: 50%;
    left: 40px;
    right: 40px;
    height: 4px;
    background: #e8e8e8;
    border-radius: 2px;
    transform: translateY(-50%);
    z-index: 1;
}

/* Progress Line (filled) */
.progress-stepper-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #56C477, #3d9d5c);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Steps Container */
.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

/* Individual Step */
.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

/* Step Circle */
.progress-step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.progress-step-circle i {
    font-size: 16px;
    color: #ccc;
    transition: color 0.3s ease;
}

/* Completed Step */
.progress-step.completed .progress-step-circle {
    background: #56C477;
    border-color: #56C477;
}

.progress-step.completed .progress-step-circle i {
    color: #fff;
}

/* Current/Active Step */
.progress-step.current .progress-step-circle {
    background: #fff;
    border-color: #FF9800;
    box-shadow: 0 0 0 4px rgba(255, 152, 0, 0.2);
    animation: pulse-orange 2s infinite;
}

.progress-step.current .progress-step-circle i {
    color: #FF9800;
}

/* Pulse animation for current step */
@keyframes pulse-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(255, 152, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0);
    }
}

/* Pending Step */
.progress-step.pending .progress-step-circle {
    background: #f5f5f5;
    border-color: #e0e0e0;
}

.progress-step.pending .progress-step-circle i {
    color: #bbb;
}

/* Step Label */
.progress-step-label {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    text-align: center;
    max-width: 80px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.progress-step.completed .progress-step-label {
    color: #56C477;
}

.progress-step.current .progress-step-label {
    color: #FF9800;
}

/* Status Badge */
.progress-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #56C477, #3d9d5c);
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 16px;
}

.progress-status-badge.status-checked_in {
    background: linear-gradient(135deg, #56C477, #3d9d5c);
}

.progress-status-badge.status-in_progress {
    background: linear-gradient(135deg, #FF9800, #f57c00);
}

.progress-status-badge.status-done {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.progress-status-badge.status-picked_up {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
}

/* Auto-refresh indicator */
.progress-refresh-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #999;
    font-size: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.progress-refresh-indicator i {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Loading State */
.progress-tracker-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #999;
}

.progress-tracker-loading i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

/* Error State */
.progress-tracker-error {
    text-align: center;
    padding: 30px;
    color: #e74c3c;
}

.progress-tracker-error i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .quickcal-progress-tracker {
        padding: 20px 16px;
        border-radius: 12px;
        margin-bottom: 16px;
    }

    .progress-tracker-header {
        margin-bottom: 20px;
    }

    .progress-tracker-header h3 {
        font-size: 16px;
        gap: 8px;
    }

    .progress-tracker-meta {
        font-size: 13px;
        line-height: 1.5;
    }

    .progress-tracker-meta span + span::before {
        content: "\2022";
        margin: 0 6px;
    }

    /* Keep horizontal layout but make it more compact */
    .progress-stepper {
        padding: 16px 0;
        margin-bottom: 16px;
    }

    .progress-stepper-line {
        left: 24px;
        right: 24px;
    }

    .progress-step-circle {
        width: 36px;
        height: 36px;
        border-width: 2px;
    }

    .progress-step-circle i {
        font-size: 13px;
    }

    .progress-step-label {
        margin-top: 8px;
        font-size: 11px;
        max-width: 60px;
        word-wrap: break-word;
    }

    .progress-status-badge {
        padding: 8px 16px;
        font-size: 13px;
        margin-top: 12px;
    }

    .progress-refresh-indicator {
        margin-top: 16px;
        padding-top: 12px;
        font-size: 11px;
    }

    /* Pulse animation smaller on mobile */
    .progress-step.current .progress-step-circle {
        box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.2);
    }
}

/* Extra small screens - switch to vertical layout */
@media (max-width: 400px) {
    .quickcal-progress-tracker {
        padding: 16px 14px;
    }

    .progress-tracker-header h3 {
        font-size: 14px;
        flex-wrap: wrap;
    }

    .progress-tracker-meta span {
        display: block;
    }

    .progress-tracker-meta span + span::before {
        display: none;
    }

    /* Vertical layout for very small screens */
    .progress-stepper {
        padding: 12px 0;
    }

    .progress-stepper-line {
        left: 18px;
        right: auto;
        top: 30px;
        bottom: 30px;
        width: 3px;
        height: auto;
        transform: none;
    }

    .progress-stepper-fill {
        width: 100% !important;
        height: var(--fill-height, 0%) !important;
    }

    .progress-steps {
        flex-direction: column;
        gap: 0;
    }

    .progress-step {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 12px 0 12px 50px;
        position: relative;
    }

    .progress-step-circle {
        position: absolute;
        left: 0;
        width: 36px;
        height: 36px;
    }

    .progress-step-label {
        margin-top: 0;
        text-align: left;
        max-width: none;
        font-size: 13px;
    }

    .progress-status-badge {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* Multiple Trackers */
.quickcal-progress-trackers-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Empty State */
.progress-tracker-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.progress-tracker-empty i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
    display: block;
}

.progress-tracker-empty h4 {
    font-size: 18px;
    color: #666;
    margin: 0 0 8px 0;
}

.progress-tracker-empty p {
    margin: 0;
    font-size: 14px;
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .progress-step.current .progress-step-circle {
        animation: none;
    }

    .progress-refresh-indicator i {
        animation: none;
    }

    .progress-stepper-fill {
        transition: none;
    }
}
