/* CSS Gradient Generator specific styles */

.gradient-generator-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Controls on left, preview/output on right */
    gap: 30px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

@media (max-width: 992px) {
    .gradient-generator-container {
        grid-template-columns: 1fr; /* Stack on smaller screens */
    }
}

.gradient-controls {
    display: flex;
    flex-direction: column;
    gap: 25px; /* Spacing between control sections */
}

.control-group {
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.control-group:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.control-section {
    padding-top: 15px;
}

.control-section-title {
    font-size: 1.2em;
    color: #007bff; /* Primary color */
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-control,
.color-stop-input,
.jscolor { /* jscolor input will also inherit form-control styles */
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-sizing: border-box;
}

.form-control:focus,
.color-stop-input:focus,
.jscolor:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.radio-group label {
    margin-right: 20px;
    font-weight: normal;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    margin-right: 5px;
}

input[type="range"] {
    width: calc(100% - 60px); /* Adjust width to accommodate value display */
    vertical-align: middle;
    margin-right: 10px;
}

.range-value {
    display: inline-block;
    min-width: 50px;
    text-align: right;
    font-weight: bold;
    color: #333;
}

/* Color Stop Item Styling */
.color-stop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.color-stop-item .jscolor {
    width: 70px; /* Specific width for color picker */
    flex-shrink: 0;
    text-align: center;
    cursor: pointer;
    border: 1px solid #ccc;
}

.color-stop-item input[type="number"] {
    width: 80px; /* Specific width for percentage input */
    flex-shrink: 0;
}

.color-stop-item .remove-color-stop {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease;
}

.color-stop-item .remove-color-stop:hover {
    color: #c82333;
}

/* Preview and Output Sections */
.gradient-preview-output {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.preview-box {
    width: 100%;
    min-height: 200px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 15px;
    background: linear-gradient(90deg, #FF6F61, #6B5B95); /* Default gradient */
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
}

.output-field-wrapper {
    position: relative;
    margin-top: 15px;
}

.output-field {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 15px;
    border-radius: 5px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.9em;
    color: #333;
    white-space: pre-wrap; /* Ensures text wraps and preserves whitespace */
    word-break: break-all; /* Breaks words to prevent overflow */
    min-height: 100px;
    overflow-y: auto;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    font-size: 0.85em;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.copy-btn:hover {
    opacity: 1;
}