/**
 * Enhanced Form Styles
 *
 * Styles for enhanced form components
 * Loaded on: Pages with enhanced forms
 */

/* Enhanced Form Styles */
.ipb_form_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 1px solid #e5e7eb;
}

.ipb_form_header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: white;
}

.ipb_form_container {
    padding: 40px;
    background: #fafbfc;
}

.ipb_enhanced_form {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.ipb_form_sections {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ipb_form_section {
    padding: 30px 40px;
    border-bottom: 1px solid #f1f5f9;
}

.ipb_form_section:last-child {
    border-bottom: none;
}

.ipb_section_header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.ipb_section_header h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ipb_section_header h3 i {
    color: #4f46e5;
    font-size: 18px;
}

.ipb_section_header p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.ipb_form_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.ipb_form_group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ipb_form_group_full {
    grid-column: 1 / -1;
}

.ipb_form_label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.ipb_form_label .required {
    color: #dc2626;
    margin-left: 2px;
}

.ipb_form_input,
.ipb_form_select {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.ipb_form_input:focus,
.ipb_form_select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.ipb_form_input.ipb_field_invalid,
.ipb_form_select.ipb_field_invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.ipb_form_input[readonly] {
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

.ipb_field_error {
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
    display: none;
}

.ipb_field_help {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* Enhanced Toggle Switches */
.ipb_toggle_container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ipb_toggle_switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.ipb_toggle_switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ipb_toggle_label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
    display: block;
}

.ipb_toggle_slider {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ipb_toggle_switch input:checked + .ipb_toggle_label {
    background: #4f46e5;
}

.ipb_toggle_switch input:checked + .ipb_toggle_label .ipb_toggle_slider {
    transform: translateX(24px);
}

.ipb_toggle_text {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

/* Form Actions */
.ipb_form_actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding: 30px 40px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

/* Messages */
.ipb_form_messages {
    padding: 0 40px 30px 40px;
}

.ipb_message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

.ipb_message_success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.ipb_message_error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.ipb_message i {
    font-size: 16px;
}
