/*
 * Riff Generator Styles (Dark Theme)
 * Version 3.0.0
 */

/* Settings Panels - Dark theme */
.grg-settings-panel {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.grg-control-group {
    margin-bottom: 15px;
}

.grg-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: inherit;
}

/* Radio and Checkbox Labels */
.grg-radio-label,
.grg-checkbox-label {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    cursor: pointer;
    font-weight: normal;
    color: inherit;
}

.grg-radio-input,
.grg-checkbox {
    margin-right: 6px;
    accent-color: #4CAF50;
}

/* Input Elements - Dark theme */
.grg-input,
.grg-select,
.grg-number-input {
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: inherit;
    box-sizing: border-box;
    border-radius: 4px;
    font-size: 14px;
}

.grg-input:focus,
.grg-select:focus,
.grg-number-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.5);
}

.grg-range-input {
    width: 100%;
    padding: 0;
    background: transparent;
}

/* Range slider styling */
.grg-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #4CAF50;
    cursor: pointer;
    border-radius: 50%;
}

.grg-range-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #4CAF50;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

.grg-range-input::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.grg-range-input::-moz-range-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.grg-file-input {
    width: 100%;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
}

.grg-file-input::-webkit-file-upload-button {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    border-radius: 4px;
    cursor: pointer;
}

.grg-file-input::-webkit-file-upload-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Buttons - Dark theme with colored accents */
.grg-button {
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    cursor: pointer;
    margin-right: 8px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.grg-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.grg-button:active {
    background: rgba(255, 255, 255, 0.15);
}

.grg-clear-button,
.grg-activate-button {
    margin-top: 10px;
}

/* Play Controls - Dark theme */
.grg-play-controls {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.grg-play-button {
    background: #4CAF50;
    color: white;
    border: 1px solid #45a049;
}

.grg-play-button:hover {
    background: #45a049;
    border-color: #3d8b40;
}

.grg-stop-button {
    background: #f44336;
    color: white;
    border: 1px solid #da190b;
}

.grg-stop-button:hover {
    background: #da190b;
    border-color: #c41709;
}

/* Beta Features - Dark theme */
.grg-fieldset {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    margin-top: 15px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
}

.grg-fieldset[disabled] {
    opacity: 0.5;
    pointer-events: none;
}

.grg-legend {
    padding: 0 10px;
    font-weight: 500;
    color: inherit;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Riffs Panels - Dark theme */
.grg-riffs-panel {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-height: 200px;
}

.riff-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.riff-item {
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.riff-item:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

.riff-info {
    margin-bottom: 10px;
    color: inherit;
}

.riff-info strong {
    color: inherit;
    font-size: 16px;
}

.riff-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.riff-actions button {
    padding: 6px 12px;
    font-size: 13px;
    margin-right: 0;
}

.rename-button {
    background: #2196F3;
    color: white;
    border: 1px solid #0b7dda;
}

.rename-button:hover {
    background: #0b7dda;
    border-color: #0a6bc4;
}

.export-button {
    background: #FF9800;
    color: white;
    border: 1px solid #e68900;
}

.export-button:hover {
    background: #e68900;
    border-color: #cc7a00;
}

.save-button {
    background: #4CAF50;
    color: white;
    border: 1px solid #45a049;
}

.save-button:hover {
    background: #45a049;
    border-color: #3d8b40;
}

.delete-button {
    background: #f44336;
    color: white;
    border: 1px solid #da190b;
}

.delete-button:hover {
    background: #da190b;
    border-color: #c41709;
}

/* Preset Items - Dark theme */
.preset-item {
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 15px;
}

.preset-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.preset-item strong {
    display: block;
    margin-bottom: 10px;
    color: inherit;
    font-size: 15px;
}

.preset-item button {
    margin-right: 8px;
    margin-top: 5px;
}

/* Registration Modal - Dark theme */
#grg-registration-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

#grg-registration-modal .nh-modal-content {
    background: #1a1a1a;
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#grg-registration-modal h3 {
    color: #fff;
}

#grg-registration-modal p {
    color: #ccc;
}

/* Presets Modal - Dark theme */
#presetsModal {
    background-color: rgba(0, 0, 0, 0.85);
}

#presetsModalContent {
    background: #1a1a1a !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.8) !important;
}

#presetsModalContent h2 {
    color: #fff;
    margin-top: 0;
}

#closePresets {
    color: #999 !important;
}

#closePresets:hover {
    color: #fff !important;
}

/* Tooltips - specific to riff generator */
.grg-info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("https://noisehaven.co/wp-content/uploads/2025/02/tooltip.svg");
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
    cursor: pointer;
    margin-left: 5px;
    filter: invert(1);
    opacity: 0.7;
}

.grg-info-icon:hover {
    opacity: 1;
}

/* Select dropdown arrow fix for dark theme */
.grg-select {
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 15px) center, calc(100% - 10px) center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 30px;
}

/* Disabled elements in dark theme */
select:disabled,
input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .grg-settings-panel {
        padding: 15px;
    }
    
    .grg-button {
        padding: 8px 12px;
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .grg-play-controls {
        padding: 10px;
    }
    
    .riff-actions {
        flex-direction: column;
    }
    
    .riff-actions button {
        width: 100%;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .checkbox-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .grg-label {
        font-size: 13px;
    }
    
    .grg-input,
    .grg-select,
    .grg-number-input {
        font-size: 13px;
    }
    
    .riff-info {
        font-size: 13px;
    }
}