/**
 * JCOGS Image Pro - Parameter Edit Styles
 * =======================================
 * CSS styles for individual parameter editing interface
 * 
 * @category   ExpressionEngine Add-on
 * @package    JCOGS Image Pro
 * @author     JCOGS Design <contact@jcogs.net>
 * @copyright  Copyright (c) 2021 - 2025 JCOGS Design
 * @license    https://jcogs.net/add-ons/license/jcogs_img_pro
 * @version    2.0.6
 * @link       https://JCOGS.net/
 * @since      Parameter Edit Interface Implementation
 */

/* Section Divider */
.section-divider {
    margin: 30px 0;
    border: none;
    border-top: 1px solid #e1e7ed;
}

/* Enhanced Parameter Info Section */
.parameter-info-section {
    background: linear-gradient(135deg, #f7f9fc 0%, #eef2f7 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e1e7ed;
    margin-bottom: 2rem;
}

.parameter-info-section h4 {
    margin: 0 0 1rem 0;
    color: #384551;
    font-weight: 600;
    font-size: 1.1rem;
}

.parameter-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item strong {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8892a4;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.preset-name,
.parameter-name,
.parameter-category {
    font-size: 0.875rem;
    color: #384551;
    font-weight: 500;
}

.current-value {
    background: #e8f4ff;
    color: #1f7dc4;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    display: inline-block;
    max-width: 100%;
    word-break: break-all;
}

.parameter-description {
    margin: 0.5rem 0 0 0;
    font-size: 0.875rem;
    color: #5d6975;
    line-height: 1.5;
}

/* Parameter Editing Layout */
.parameter-editing-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1200px) {
    .parameter-editing-layout {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

.parameter-form-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e1e7ed;
    height: fit-content;
}

.parameter-form-section h4 {
    margin: 0 0 1.5rem 0;
    color: #384551;
    font-weight: 600;
    font-size: 1.1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f2f5;
}

/* Hide the default form footer with save button */
.parameter-form-section .panel-footer {
    display: none !important;
}

/* Specifically target the bottom form-btns in panel-footer, not our custom ones */
.parameter-form-section .panel-footer .form-btns {
    display: none !important;
}

/* Enhanced Form Styling */
.parameter-form-section .form-group {
    margin-bottom: 1.5rem;
}

.parameter-form-section .form-group:last-child {
    margin-bottom: 0;
}

.parameter-form-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #384551;
    font-size: 0.875rem;
}

.parameter-form-section .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d4dae2;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: #fff;
}

.parameter-form-section .form-control:focus {
    outline: none;
    border-color: #1f7dc4;
    box-shadow: 0 0 0 3px rgba(31, 125, 196, 0.1);
}

.parameter-form-section .form-control[readonly] {
    background: #f7f9fc;
    color: #8892a4;
}

/* Field Groups */
.parameter-form-section .field-group {
    background: #fafbfc;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #f0f2f5;
    margin-bottom: 1rem;
}

.parameter-form-section .field-group legend {
    font-weight: 600;
    color: #384551;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
}

/* Help Text */
.parameter-form-section .help-text {
    font-size: 0.75rem;
    color: #8892a4;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Form Actions */
.parameter-form-section .form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f2f5;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.parameter-form-section .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.parameter-form-section .btn-primary {
    background: #1f7dc4;
    color: #fff;
    border: 1px solid #1f7dc4;
}

.parameter-form-section .btn-primary:hover {
    background: #1a6ba8;
    border-color: #1a6ba8;
}

.parameter-form-section .btn-secondary {
    background: #6c757d;
    color: #fff;
    border: 1px solid #6c757d;
}

.parameter-form-section .btn-default {
    background: #fff;
    color: #5d6975;
    border: 1px solid #d4dae2;
}

.parameter-form-section .btn-default:hover {
    background: #f7f9fc;
    border-color: #bdc4d0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .parameter-details {
        grid-template-columns: 1fr;
    }
    
    .parameter-form-section .form-actions {
        flex-direction: column;
    }
    
    .parameter-form-section .btn {
        justify-content: center;
    }
}

/* Color Picker Enhancement (#61) */
.jcogs-color-field-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jcogs-color-field {
    flex: 1;
}

.jcogs-color-picker-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s;
}

.jcogs-color-picker-btn:hover {
    border-color: #5D9DD5;
}

.jcogs-color-picker-btn input[type="color"] {
    position: absolute;
    top: -5px;
    left: -5px;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    border: none;
    cursor: pointer;
}

.jcogs-color-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 2px;
}

.jcogs-color-picker-label {
    font-size: 11px;
    color: #8592a6;
    text-align: center;
    margin-top: 4px;
}
