/* 
 * NoiseHaven Tools - Common Styles (Dark Theme Compatible)
 * Version 2.0.0
 * Shared styles across all tools
 */

/* Common control group styling */
.nh-control-group,
.control-group {
    margin-bottom: 15px;
}

.nh-control-group label,
.control-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: inherit; /* Inherit from parent theme */
}

/* Common input styling - Dark theme friendly */
.nh-input,
.nh-select,
input[type="number"],
select,
input[type="range"],
input[type="file"] {
    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;
}

input[type="number"]:focus,
select:focus,
input[type="file"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.4);
}

input[type="range"] {
    padding: 0;
    background: transparent;
}

/* Range slider styling for dark theme */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #4CAF50;
    cursor: pointer;
    border-radius: 50%;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #4CAF50;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Common button styling - Dark theme */
.nh-button,
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;
}

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

.nh-button:disabled,
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Checkbox and radio styling */
.nh-checkbox,
.nh-radio {
    margin-right: 8px;
    accent-color: #4CAF50;
}

.nh-checkbox-label,
.nh-radio-label {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    cursor: pointer;
    color: inherit;
}

/* Common panel styling - Dark theme */
.nh-panel,
.nh-settings-panel {
    background: rgba(0, 0, 0, 0.3);
    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.1);
}

/* Tooltip styling - Dark theme */
.nh-info-icon,
.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); /* Invert color for dark theme */
    opacity: 0.7;
}

.nh-info-icon:hover,
.info-icon:hover {
    opacity: 1;
}

.nh-tooltip,
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    z-index: 10000;
    pointer-events: none;
    max-width: 250px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Modal styling - Dark theme */
.nh-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;
}

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

.nh-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.nh-modal-close:hover {
    color: #fff;
}

/* List styling - Dark theme */
.nh-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nh-list-item {
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

/* Responsive utilities */
@media (max-width: 768px) {
    .nh-button,
    button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .nh-modal-content {
        padding: 20px;
    }
}