/* Gradient Generator Tool CSS */

.tool-container {
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Gradient Type Selector */
.gradient-type-selector {
    margin-bottom: 1.5rem;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 0.5rem 1.2rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    border-bottom-color: #4a6cf7;
    color: #4a6cf7;
}

.tab-btn:hover:not(.active) {
    background-color: #f5f5f5;
}

/* Gradient Preview */
.gradient-preview-container {
    width: 100%;
    margin-bottom: 1.5rem;
}

#gradient-preview {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: linear-gradient(90deg, #ff5757 0%, #5271ff 100%);
}

/* Controls Container */
.controls-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Gradient Controls */
.gradient-controls {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    border: 1px solid #eee;
    padding: 1rem;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.gradient-controls.active {
    display: grid;
}

.form-group {
    margin-bottom: 0.8rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
    color: #333;
}

.form-group select,
.form-group input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Color Stops */
.color-stops-container {
    border: 1px solid #eee;
    padding: 1rem;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.color-stops-container h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

#color-stops {
    margin-bottom: 1rem;
}

.color-stop {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    gap: 0.8rem;
}

.color-picker {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.stop-position {
    width: 60px;
    padding: 0.4rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.percent-sign {
    margin-left: -5px;
}

.delete-stop {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.2s;
}

.delete-stop:hover {
    background: #e74c3c;
}

.delete-stop:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
}

.btn-full {
    width: 100%;
}

/* CSS Output */
.css-output-container {
    margin-top: 1.5rem;
}

.code-container {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

pre#css-code {
    font-family: monospace;
    white-space: pre-wrap;
    margin: 0;
    padding: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
    background-color: #282c34;
    color: #abb2bf;
    border-radius: 4px;
}

#copy-css {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .gradient-controls {
        grid-template-columns: 1fr;
    }
    
    .color-stop {
        flex-wrap: wrap;
    }
}