/* Additional Styles - Missing styles for forms and components */

/* Form Sections */
.form-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background: #f8f9fa;
}

.form-section legend {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    padding: 0 10px;
    background: white;
    border: none;
    margin-bottom: 15px;
}

/* Form Rows */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* File Preview */
.file-preview {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: white;
}

.file-preview img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 6px;
    margin-top: 10px;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength::before {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: #dc3545;
    transition: all 0.3s ease;
}

.password-strength.weak::before {
    width: 25%;
    background: #dc3545;
}

.password-strength.fair::before {
    width: 50%;
    background: #ffc107;
}

.password-strength.good::before {
    width: 75%;
    background: #17a2b8;
}

.password-strength.strong::before {
    width: 100%;
    background: #28a745;
}

/* Checkbox Styles */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Input Groups */
.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
}

.input-group button {
    flex-shrink: 0;
}

/* Share Options */
.share-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Instance Details */
.instance-details {
    display: grid;
    gap: 30px;
}

.detail-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.detail-item label {
    font-weight: 600;
    color: #666;
    margin: 0;
}

.detail-item span {
    color: #2c3e50;
    font-weight: 500;
}

.instance-content-preview {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.instance-actions-detailed {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Template Preview */
.template-preview {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

/* Variables Management */
.variables-management {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.variables-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.variable-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.variable-info {
    flex: 1;
}

.variable-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.variable-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
}

.variable-type {
    display: inline-block;
    padding: 2px 8px;
    background: #667eea;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.variable-actions {
    display: flex;
    gap: 10px;
}

.add-variable-section {
    text-align: center;
    padding: 20px;
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

/* Editor Toolbar */
.editor-toolbar {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}

.editor-toolbar .btn {
    padding: 6px 10px;
    font-size: 12px;
    min-width: auto;
}

.editor-content {
    min-height: 200px;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 0 0 6px 6px;
    background: white;
    font-family: 'Cairo', Arial, sans-serif;
    line-height: 1.6;
}

.editor-content:focus {
    outline: none;
    border-color: #667eea;
}

/* System Filter */
.system-filter {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.system-filter label {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.system-filter select {
    min-width: 200px;
}

/* Filters Section */
.filters-section {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.filter-group select,
.filter-group input {
    min-width: 150px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
}

.page-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Grid View Styles */
.instances-container.grid-view .instances-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.instances-container.grid-view .instance-item {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
}

.instances-container.grid-view .instance-actions {
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-section {
        flex-direction: column;
    }
    
    .filter-group select,
    .filter-group input {
        min-width: auto;
        width: 100%;
    }
    
    .instance-actions-detailed {
        flex-direction: column;
    }
    
    .variable-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .variable-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 15px;
    }
    
    .detail-section h3 {
        font-size: 16px;
    }
    
    .editor-toolbar {
        flex-wrap: wrap;
    }
    
    .system-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .system-filter select {
        min-width: auto;
    }
}
