/* Color Harmony Generator Plugin Styles */
.chg-container {
    background-color: #f4f4f4;
    color: #222222;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    padding: 0;
    margin: 20px auto;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.chg-container * {
    box-sizing: border-box;
}

/* Header bar styled light neon green, text dark, centered */
.chg-header {
    background-color: #39FF14;
    color: #222222;
    text-align: center;
    padding: 20px 15px;
    margin: 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.chg-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #222222 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chg-workspace {
    padding: 25px;
}

/* Control Panel */
.chg-control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    flex-wrap: wrap;
    gap: 15px;
}

.chg-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chg-input-group label {
    font-weight: 600;
    font-size: 15px;
    color: #222222;
}

.chg-picker-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #cccccc;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

input[type="color"]#chg-base-color {
    border: none;
    padding: 0;
    width: 45px;
    height: 40px;
    cursor: pointer;
    background: none;
}

input[type="text"]#chg-hex-input {
    border: none;
    padding: 0 10px;
    width: 90px;
    height: 40px;
    font-family: monospace;
    font-size: 14px;
    color: #222222;
    outline: none;
}

/* Button style light neon green background, dark text */
.chg-btn {
    background-color: #39FF14;
    color: #222222;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chg-btn:hover {
    background-color: #32e610;
}

.chg-btn:active {
    transform: scale(0.98);
}

/* Section styling */
.chg-section {
    background: #ffffff;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.chg-section-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    border-bottom: 2px solid #f4f4f4;
    padding-bottom: 10px;
    color: #222222;
}

/* Harmonies Layout Grid */
.chg-harmony-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.chg-harmony-block h3, .chg-utility-block h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Palettes Rows */
.chg-palette-row {
    display: flex;
    width: 100%;
    height: 65px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.chg-color-swatch {
    flex: 1;
    height: 100%;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 6px;
}

.chg-color-swatch:hover {
    transform: scale(1.02);
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.chg-swatch-label {
    font-family: monospace;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.85);
    padding: 2px 4px;
    border-radius: 3px;
    color: #222222;
    pointer-events: none;
    opacity: 0.85;
}

/* Two-column view for Utilities */
.chg-utilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

/* Contrast Block */
.chg-contrast-box {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

#contrast-light-text, #contrast-dark-text {
    padding: 15px;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.1s ease;
}

#contrast-light-text span, #contrast-dark-text span {
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* Gradient Preview */
.chg-gradient-preview {
    width: 100%;
    height: 80px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
    transition: background 0.1s ease;
}

.chg-code-display {
    display: block;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    color: #444444;
    word-break: break-all;
    border: 1px solid #e9ecef;
}

/* Toast alert */
.chg-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #222222;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.chg-toast.show {
    opacity: 1;
    visibility: visible;
}

/* Auto Adjust / Device Responsiveness overrides */
@media (max-width: 768px) {
    .chg-control-panel {
        flex-direction: column;
        align-items: flex-start;
    }
    .chg-btn {
        width: 100%;
        justify-content: center;
    }
    .chg-input-group {
        width: 100%;
        justify-content: space-between;
    }
}
