/* Gradient Studio - Tool-specific styles */
/* Base styles are in /css/tool-layout.css */

/* Gradient Type Selector */
.gradient-type-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gradient-type-btn {
    flex: 1;
    min-width: 100px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gradient-type-btn:hover {
    background-color: var(--bg-hover);
}

.gradient-type-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.gradient-type-btn.active {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--text-inverse);
}

.gradient-type-btn .pro-badge {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--accent-warning);
    color: var(--text-inverse);
    border-radius: var(--radius-sm);
}

/* Slider Controls */
.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider {
    flex: 1;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.slider-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: right;
}

/* Select Control */
.select {
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
}

.select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Color Stops */
.color-stops {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.color-stop {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
}

.color-input {
    width: 48px;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: none;
    padding: 0;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
}

.position-slider {
    flex: 1;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.position-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
}

.position-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.position-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 36px;
    text-align: right;
}

.remove-stop {
    width: 28px;
    height: 28px;
    background-color: var(--accent-danger);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-inverse);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 150ms ease;
    flex-shrink: 0;
}

.remove-stop:hover {
    background-color: #dc2626;
}

.remove-stop:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.color-stop-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.limit-message {
    font-size: 13px;
    color: var(--text-muted);
}

/* Preset Grid */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.preset-btn {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: all 150ms ease;
    text-align: center;
}

.preset-btn:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-hover);
}

.preset-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.preset-preview {
    width: 100%;
    height: 60px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    border: 1px solid var(--border-default);
}

.preset-btn span {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.pro-badge-inline {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 4px;
    border-radius: 3px;
    background: var(--accent-warning);
    color: var(--text-inverse);
}

/* Preview Container */
.preview-container {
    margin-bottom: 24px;
}

.gradient-preview {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    background: linear-gradient(90deg, #ff6b6b 0%, #4ecdc4 100%);
}

/* Output Group */
.output-group {
    margin-bottom: 24px;
}

.output-group:last-child {
    margin-bottom: 0;
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 12px;
}

.output-header label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.code-container {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 16px;
    overflow-x: auto;
}

.code-output {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

/* Export Buttons */
.export-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

/* Pro Features Section */
.pro-features-section {
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

.pro-features-section .section-header {
    margin-bottom: var(--space-md);
}

.pro-features-section .section-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.pro-features-section .pro-badge {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--accent-warning);
    color: var(--text-inverse);
    border-radius: var(--radius-sm);
}

/* Button States */
.btn-primary.success {
    background-color: var(--accent-success);
}

.btn-primary.success:hover {
    background-color: #059669;
}

/* Similar Tools Section */
.similar-tools {
    margin-top: var(--space-xxl);
    padding: var(--space-xl) 0;
}

.similar-tools h2 {
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
}

.similar-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
}

.similar-tool-card {
    background: var(--bg-secondary);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    text-decoration: none;
    transition: all 150ms ease;
}

.similar-tool-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

.similar-tool-card:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.similar-tool-card h3 {
    margin: 0 0 var(--space-xs) 0;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
}

.similar-tool-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 640px) {
    .gradient-type-selector {
        flex-direction: column;
    }
    
    .gradient-type-btn {
        min-width: 100%;
    }
    
    .color-stop {
        flex-wrap: wrap;
    }
    
    .color-input {
        width: 44px;
        height: 36px;
    }
    
    .preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .export-buttons {
        grid-template-columns: 1fr;
    }
    
    .slider-container {
        flex-wrap: wrap;
    }
    
    .slider {
        width: 100%;
        order: 2;
    }
    
    .slider-value {
        order: 1;
    }
}
