/* SOURCE Module Specific Styles */

.source-module {
    /* Inherits base module-type1 styles */
}

/* File Upload Area */
.file-upload-area {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.file-upload-btn {
    width: 100%;
    padding: 8px;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.file-upload-btn:hover {
    background: #00E897;
    color: #000;
    border-color: #00E897;
}

/* Info Display Box */
.info-display-box {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    border-bottom: 1px solid #222;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 10px;
    color: #888;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
}

.info-value {
    font-size: 11px;
    color: #00E897;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.info-value.file-name {
    color: #ffaa00;
}

.info-value.file-type {
    color: #00aaff;
    text-transform: uppercase;
}

.info-value.file-duration {
    color: #00E897;
}

/* dB Meter */
.db-meter-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.db-meter-bar {
    flex: 1;
    height: 20px;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.db-meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        #00ff00 0%, 
        #88ff00 20%, 
        #ffff00 60%, 
        #ff8800 80%, 
        #ff0000 95%);
    transition: width 0.1s ease;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

.db-value {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #00E897;
    font-weight: bold;
    min-width: 45px;
    text-align: right;
}

/* Run Button Styling */
.source-run-btn {
    width: 100%;
    font-size: 14px;
}

.source-run-btn.active {
    background: #00E897;
    color: #000;
    border-color: #00E897;
}

/* Small Toggle Switch Styling for Mode */
.toggle-switch-container-small {
    display: flex;
    gap: 0;
    border: 1px solid #555;
    border-radius: 4px;
    overflow: hidden;
}

.toggle-switch-btn-small {
    flex: 1;
    padding: 5px 10px;
    background: #333;
    color: #999;
    border: none;
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
    transition: all 0.3s ease;
    border-right: 1px solid #555;
}

.toggle-switch-btn-small:last-child {
    border-right: none;
}

.toggle-switch-btn-small:hover {
    background: #444;
    color: #fff;
}

.toggle-switch-btn-small.active {
    background: #00E897;
    color: #000;
}

.toggle-switch-btn-small.active:hover {
    background: #00d182;
}

/* Active State Animations */
.source-module.playing .output-signal {
    background: #0f0;
    box-shadow: 0 0 6px #0f0;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* File loaded state */
.source-module.file-loaded .file-upload-btn {
    background: #00E897;
    color: #000;
}

.source-module.file-loaded .file-upload-btn:hover {
    background: #00d182;
}
