/* Component-specific styles */
/* This file can be used to add additional component styles as needed */

/* Auto-detection Status and Spinner */
.detection-status {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--color-background-secondary, #f5f5f5);
    border-radius: var(--radius-md, 8px);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: opacity 0.3s ease;
}

.detection-status.hidden {
    display: none;
}

.detection-message {
    margin: 0;
    color: var(--color-text-secondary, #666);
    font-size: 0.95rem;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-border, #e0e0e0);
    border-top-color: var(--color-primary, #2E7D32);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Insertion Animation */
.insertion-animation {
    max-width: 500px;
    width: 100%;
    height: auto;
    line-height: 0; /* Remove extra space below image */
}

.insertion-svg {
    width: 100%;
    height: auto;
    display: block; /* Remove inline spacing */
}

.mode-svg {
    width: 200px;
    height: 150px;
    margin: 0 auto;
    display: block;
}

/* Device connection status */
.device-connection-status {
    background: var(--color-background);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.1);
}

.device-status {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    font-size: 1.125rem;
    font-weight: 500;
    border-bottom: 1px solid var(--color-border);
}

.device-status:last-child {
    border-bottom: none;
}

.status-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.status-text {
    flex: 1;
    color: var(--color-text-primary);
}

.connection-instruction {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(46, 125, 50, 0.05);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-primary);
    color: var(--color-text-primary);
}

/* Final instructions */
.final-instructions {
    margin-top: 30px;
    padding: 20px;
    background: #F5F5F5;
    border-radius: 8px;
}

.final-instructions h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

/* Progress Bar - Complete Redesign */
.progress-container {
    width: 100%;
    background: var(--color-surface);
    border-bottom: 2px solid var(--color-border);
    padding: 25px 0;
    box-shadow: var(--shadow-sm);
    margin: 0;
    position: relative;
}

.progress-bar {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    --progress-width: 0%;
}

/* Progress line background */
.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 10%;
    right: 10%;
    height: 12px;
    background: var(--color-border);
    border-radius: 6px;
    z-index: 1;
}

/* Progress line fill */
.progress-bar::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 10%;
    height: 12px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: 6px;
    z-index: 2;
    transition: width 0.5s ease;
    width: calc(var(--progress-width, 0%) * 0.8);
    box-shadow: 0 2px 4px rgba(46, 125, 50, 0.3);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 5px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: var(--color-text-secondary);
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progress-step.completed .step-circle {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.progress-step.completed .step-circle span {
    display: none;
}

.progress-step.completed .step-circle::after {
    content: '✓';
    position: absolute;
    font-size: 16px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.progress-step.active .step-circle {
    background: var(--color-surface);
    border-color: var(--color-primary);
    border-width: 5px;
    color: var(--color-primary);
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(46, 125, 50, 0.1), 0 4px 8px rgba(0,0,0,0.1);
}

.step-label {
    margin-top: 10px;
    font-size: 12px;
    color: var(--color-text-secondary);
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    max-width: 80px;
}

.progress-step.completed .step-label {
    color: var(--color-primary);
    font-weight: 600;
}

.progress-step.active .step-label {
    color: var(--color-text-primary);
    font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .progress-bar {
        padding: 0 10px;
    }
    
    .step-label {
        font-size: 10px;
        max-width: 60px;
    }
    
    .step-circle {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
}

/* Instruction Highlight */
.instruction-highlight {
    background: #F5F5F5;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
}

.button-combo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 18px;
}

.button-key {
    background: #2E7D32;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.plus {
    color: #666;
    font-size: 24px;
    font-weight: bold;
}

/* Firmware Version Selection */
.firmware-selection {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.version-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.version-dropdown {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: border-color 0.2s;
}

.version-dropdown:hover {
    border-color: var(--color-primary);
}

.version-dropdown:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* Changelog Container */
.changelog-container {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin: 1.5rem 0;
    max-width: 100%;
}

.changelog-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text-primary);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.changelog-content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    max-height: 150px;
    overflow-y: auto;
}

.changelog-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.813rem;
    line-height: 1.5;
    margin: 0;
    white-space: pre-wrap;
    color: var(--color-text-secondary);
}

/* Custom scrollbar for changelog */
.changelog-content::-webkit-scrollbar {
    width: 6px;
}

.changelog-content::-webkit-scrollbar-track {
    background: var(--color-background);
    border-radius: 3px;
}

.changelog-content::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.changelog-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-secondary);
}