/* Accelerometer Tester Styles */

/* Acceleration Bar Wrapper */
.acceleration-bar-wrapper {
    position: relative;
    width: 100%;
    height: 40px;
    background: linear-gradient(to right,
        rgba(220, 53, 69, 0.1) 0%,
        rgba(220, 53, 69, 0.05) 25%,
        rgba(25, 135, 84, 0.1) 40%,
        rgba(25, 135, 84, 0.1) 60%,
        rgba(220, 53, 69, 0.05) 75%,
        rgba(220, 53, 69, 0.1) 100%
    );
    border-radius: 0.375rem;
    border: 1px solid var(--bs-border-color);
    overflow: hidden;
}

[data-bs-theme="dark"] .acceleration-bar-wrapper {
    background: linear-gradient(to right,
        rgba(220, 53, 69, 0.2) 0%,
        rgba(220, 53, 69, 0.1) 25%,
        rgba(25, 135, 84, 0.2) 40%,
        rgba(25, 135, 84, 0.2) 60%,
        rgba(220, 53, 69, 0.1) 75%,
        rgba(220, 53, 69, 0.2) 100%
    );
}

/* Center line (zero point) */
.acceleration-bar-wrapper::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: var(--bs-primary-text-emphasis);
    transform: translateX(-50%);
    z-index: 1;
    opacity: 0.3;
}

/* Acceleration Bar (indicator) */
.acceleration-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 80%;
    background-color: #198754;
    border-radius: 2px;
    transform: translate(-50%, -50%);
    transition: left 0.1s ease-out, background-color 0.2s ease;
    box-shadow: 0 0 8px currentColor;
    z-index: 2;
}

/* Vector Canvas Wrapper */
.vector-canvas-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    position: relative;
    background-color: var(--bs-body-bg);
    border-radius: 0.375rem;
    overflow: hidden;
}

#vectorCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Badge Styles */
#magnitudeValue {
    font-size: 0.875rem;
    font-weight: 600;
}

#xValue, #yValue, #zValue {
    min-width: 90px;
    text-align: center;
    font-weight: 600;
}

/* Max Values Card */
.card-body .d-flex strong {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .acceleration-bar-wrapper {
        height: 35px;
    }

    .vector-canvas-wrapper {
        max-width: 100%;
    }

    #xValue, #yValue, #zValue {
        min-width: 85px;
        font-size: 0.8rem;
    }

    .form-label strong {
        font-size: 0.9rem;
    }

    .form-label small {
        font-size: 0.75rem;
    }
}

/* Animation for active state */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.acceleration-bar.active {
    animation: pulse 1s ease-in-out infinite;
}

/* Info textarea styling */
#info {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}
