/* Form Builder Admin Page */
.authyo-chatlead-form-builder-wrap {
    max-width: 1200px;
    margin: 20px 0;
}

.authyo-chatlead-form-builder-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

/* Field List Panel */
.authyo-chatlead-field-list-panel {
    background: white;
    padding: 20px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.authyo-chatlead-field-list-panel h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.authyo-chatlead-field-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.authyo-chatlead-field-item {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: move;
    transition: all 0.2s;
}

.authyo-chatlead-field-item:hover {
    background: #f0f0f0;
    border-color: #0073aa;
}

.authyo-chatlead-field-item.authyo-chatlead-dragging {
    opacity: 0.5;
}

.authyo-chatlead-field-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.authyo-chatlead-field-item-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.authyo-chatlead-drag-handle {
    cursor: move;
    color: #999;
    font-size: 18px;
}

.authyo-chatlead-field-item-actions {
    display: flex;
    gap: 5px;
}

.authyo-chatlead-field-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.authyo-chatlead-field-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.authyo-chatlead-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.authyo-chatlead-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.authyo-chatlead-field-toggle input:checked+.authyo-chatlead-toggle-slider {
    background-color: #0073aa;
}

.authyo-chatlead-field-toggle input:checked+.authyo-chatlead-toggle-slider:before {
    transform: translateX(20px);
}

.authyo-chatlead-field-remove {
    background: #d63638;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.authyo-chatlead-field-remove:hover {
    background: #b32d2e;
}

.authyo-chatlead-field-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.authyo-chatlead-field-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.authyo-chatlead-field-input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.authyo-chatlead-field-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Available Fields Panel */
.authyo-chatlead-available-fields-panel {
    background: white;
    padding: 20px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.authyo-chatlead-available-fields-panel h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.authyo-chatlead-available-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.authyo-chatlead-add-field-btn {
    background: #f0f0f1;
    border: 1px dashed #0073aa;
    padding: 15px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    color: #0073aa;
    font-weight: 500;
}

.authyo-chatlead-add-field-btn:hover {
    background: #e8f5fa;
    border-style: solid;
}

.authyo-chatlead-add-field-btn:active {
    transform: scale(0.98);
}

/* Action Buttons */
.authyo-chatlead-form-builder-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.authyo-chatlead-save-config-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.authyo-chatlead-save-config-btn:hover {
    background: #005177;
}

.authyo-chatlead-save-config-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.authyo-chatlead-reset-config-btn {
    background: white;
    color: #d63638;
    border: 1px solid #d63638;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.authyo-chatlead-reset-config-btn:hover {
    background: #fef7f7;
}

/* Status Messages */
.authyo-chatlead-status-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 15px;
    display: none;
}

.authyo-chatlead-status-message.success {
    background: #edfaef;
    border-left: 4px solid #00a32a;
    color: #00a32a;
}

.authyo-chatlead-status-message.error {
    background: #fef7f7;
    border-left: 4px solid #d63638;
    color: #d63638;
}

.authyo-chatlead-status-message.show {
    display: block;
    animation: authyo-chatlead-slide-down 0.3s ease-out;
}

@keyframes authyo-chatlead-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty State */
.authyo-chatlead-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.authyo-chatlead-empty-state-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 782px) {
    .authyo-chatlead-form-builder-container {
        grid-template-columns: 1fr;
    }

    .authyo-chatlead-field-details {
        grid-template-columns: 1fr;
    }

    .authyo-chatlead-available-fields {
        grid-template-columns: 1fr;
    }
}
